hlsl.numericsuffixes.frag 726 B

12345678910111213141516171819202122232425
  1. struct PS_OUTPUT { float4 color : SV_Target0; };
  2. PS_OUTPUT main()
  3. {
  4. // Test numeric suffixes
  5. float r00 = 1.0f; // float
  6. uint r01 = 1u; // lower uint
  7. uint r02 = 2U; // upper uint
  8. uint r03 = 0xabcu; // lower hex uint
  9. uint r04 = 0xABCU; // upper hex uint (upper 0X is not accepted)
  10. int r05 = 5l; // lower long int
  11. int r06 = 6L; // upper long int
  12. int r07 = 071; // octal
  13. uint r08 = 072u; // unsigned octal
  14. float r09 = 1.h; // half
  15. float r10 = 1.H; // half
  16. float r11 = 1.1h; // half
  17. float r12 = 1.1H; // half
  18. PS_OUTPUT ps_output;
  19. ps_output.color = r07; // gets 71 octal = 57 decimal
  20. return ps_output;
  21. }