diff --git a/tests/hlsl/ternary.shader_test b/tests/hlsl/ternary.shader_test index 1fc2f070..99fee241 100644 --- a/tests/hlsl/ternary.shader_test +++ b/tests/hlsl/ternary.shader_test @@ -31,3 +31,18 @@ float4 main() : sv_target uniform 0 float4 1.1 3.0 4.0 5.0 draw quad probe all rgba (1.1, 2.0, 0.0, 0.0) + +[pixel shader] +float4 f; + +float4 main() : sv_target +{ + float f1 = 0.1, f2 = 0.2, f3; + f3 = f.x ? (f1 = 0.5) + 0.2 : (f2 = 0.6); + return float4(f1, f2, f3, 0.0); +} + +[test] +uniform 0 float4 1.0 0.0 0.0 0.0 +draw quad +probe all rgba (0.5, 0.6, 0.7, 0.0)