2017-04-11 23:30:08 +00:00
|
|
|
float4 c4;
|
|
|
|
float4 t4;
|
|
|
|
float4 f4;
|
|
|
|
float t;
|
|
|
|
float f;
|
|
|
|
|
|
|
|
float4 vectorCond()
|
|
|
|
{
|
2017-04-12 01:45:00 +00:00
|
|
|
return (c4 ? t4 : f4) +
|
2017-04-12 02:17:23 +00:00
|
|
|
(c4 ? t : f ) +
|
2017-04-21 03:32:16 +00:00
|
|
|
(t4 < f4 ? t4 : f4) +
|
|
|
|
(c4 ? t : f4);
|
|
|
|
}
|
|
|
|
|
|
|
|
float4 scalarCond()
|
|
|
|
{
|
|
|
|
float4 ret = t != f ? t * f4 : 1;
|
|
|
|
return ret;
|
2017-04-12 02:17:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
float2 fbSelect(bool2 cnd, float2 src0, float2 src1)
|
|
|
|
{
|
|
|
|
return cnd ? src0 : src1;
|
2017-04-11 23:30:08 +00:00
|
|
|
}
|
|
|
|
|
2016-07-27 16:39:57 +00:00
|
|
|
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;
|
2017-04-21 03:32:16 +00:00
|
|
|
return e * ret + f + vectorCond() + scalarCond() +
|
2017-04-12 02:17:23 +00:00
|
|
|
float4(fbSelect(bool2(true, false), float2(1.0, 2.0), float2(3.0, 4.0)), 10.0, 10.0);
|
2016-07-27 16:39:57 +00:00
|
|
|
}
|