• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2struct MyStruct {
3    sample        float a;
4    noperspective float b;
5    linear        float c;
6    centroid      float d;
7};
8
9int sample(int x) { return x; } // HLSL allows this as an identifier as well.
10
11float4 main() : SV_Target0
12{
13    // HLSL allows this as an identifier as well.
14    // However, this is not true of other qualifier keywords such as "linear".
15    float4 sample = float4(3,4,5,6);
16
17    return sample.rgba; // 'sample' can participate in an expression.
18}
19