glslang/Test/hlsl.conditional.frag
John Kessenich 00957f8110 HLSL: Implement ?: grammar productions.
Missing are implicit conversions between int/bool/etc.
2016-07-27 10:39:57 -06:00

17 lines
472 B
GLSL

float4 PixelShaderFunction(float4 input) : COLOR0
{
int a = 1 < 2 ? 3 < 4 ? 5 : 6 : 7;
int b = 1 < 2 ? 3 > 4 ? 5 : 6 : 7;
int c = 1 > 2 ? 3 > 4 ? 5 : 6 : 7;
int d = 1 > 2 ? 3 < 4 ? 5 : 6 : 7;
float4 ret = a * input +
b * input +
c * input +
d * input;
int e;
e = a = b ? c = d : 10, b = a ? d = c : 11;
float4 f;
f = ret.x < input.y ? c * input : d * input;
return e * ret + f;
}