https://github.com/shader-slang/slang
Raw File
Tip revision: 1e5ec5ca8c73e91c63b787e69c7286728f510b5e authored by jsmall-nvidia on 04 December 2019, 18:49:26 UTC
Setting downstream compiler (#1144)
Tip revision: 1e5ec5c
imported-parameters.slang
//TEST_IGNORE_FILE:

// We are declaring the uniform shader parameters
// in this imported file, to ensure that they are
// emitted correctly.

cbuffer Uniforms
{
	float4x4 modelViewProjection;
};

float3 transformColor(float3 color)
{
	float3 result;

	result.x = sin(20.0 * (color.x + color.y));
	result.y = saturate(cos(color.z * 30.0));
	result.z = sin(color.x * color.y * color.z * 100.0);

	result = 0.5 * (result + 1);

	return result;
}
back to top