hlsl.matrixSwizzle.vert 812 B

12345678910111213141516171819202122232425262728293031323334
  1. void ShaderFunction(float inf) : COLOR0
  2. {
  3. float3x4 m;
  4. // tests that convert to non-matrix swizzles
  5. m._34 = 1.0; // AST should have a normal component select
  6. m._m23 = 2.0; // same code
  7. m[2][3] = 2.0; // same code
  8. m._11_12_13_14 = float4(3.0); // AST should have normal column selection (first row)
  9. m._m10_m11_m12_m13 = float4(3.0); // AST should have normal column selection (second row)
  10. m[1] = float4(3.0); // same code
  11. // tests that stay as matrix swizzles
  12. float3 f3;
  13. m._11_22_23 = f3;
  14. m._21_12_31 = float3(5.0);
  15. m._11_12_21 = 2 * f3;
  16. // r-value
  17. f3 = m._21_12_31;
  18. }
  19. float3x3 createMat3x3(float3 a, float3 b, float3 c)
  20. {
  21. float3x3 m;
  22. m._11_21_31 = a;
  23. m._12_22_32 = b;
  24. m._13_23_33 = c;
  25. return m;
  26. }