SPIRV-Cross/reference/shaders-hlsl/frag/boolean-mix.frag
Hans-Kristian Arntzen 851acf3712 Avoid boolean mix in HLSL.
Update glslang travis checkout as boolean mix support was broken on that commit.
2017-05-04 10:28:30 +02:00

29 lines
585 B
GLSL

static float2 FragColor;
static float2 x0;
struct SPIRV_Cross_Input
{
float2 x0 : TEXCOORD0;
};
struct SPIRV_Cross_Output
{
float2 FragColor : SV_Target0;
};
void frag_main()
{
bool _21 = x0.x > x0.y;
bool2 _27 = bool2(_21, _21);
FragColor = float2(_27.x ? float2(1.0f, 0.0f).x : float2(0.0f, 1.0f).x, _27.y ? float2(1.0f, 0.0f).y : float2(0.0f, 1.0f).y);
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
x0 = stage_input.x0;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;
return stage_output;
}