2016-11-16 20:22:11 +00: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-19 00:51:14 +00:00
|
|
|
float4 sample = float4(3,4,5,6);
|
2016-11-16 20:22:11 +00:00
|
|
|
|
2016-12-19 00:51:14 +00:00
|
|
|
return sample.rgba; // 'sample' can participate in an expression.
|
2016-11-16 20:22:11 +00:00
|
|
|
}
|