bgfx/3rdparty/glslang/Test/hlsl.identifier.sample.frag

19 lines
478 B
GLSL
Raw Normal View History

2016-12-16 01:19:54 +03:00
struct MyStruct {
sample float a;
noperspective float b;
linear float c;
centroid float d;
};
int sample(int x) { return x; } // HLSL allows this as an identifier as well.
float4 main() : SV_Target0
{
// HLSL allows this as an identifier as well.
// However, this is not true of other qualifier keywords such as "linear".
2016-12-22 09:59:02 +03:00
float4 sample = float4(3,4,5,6);
2016-12-16 01:19:54 +03:00
2016-12-22 09:59:02 +03:00
return sample.rgba; // 'sample' can participate in an expression.
2016-12-16 01:19:54 +03:00
}