blob: affa0181f15da8e53bfc784965daa5566d8336fe [file] [log] [blame]
uniform float u1[4];
float index_by_literal_0();
uniform float u2[4];
float index_by_loop_0();
uniform float u3[4];
float index_by_complex_loop_0();
uniform float u4[16];
float index_out_of_bounds_checked_0();
float index_by_literal_0()
{
return u1[0];
}
float index_by_loop_0()
{
float sum = 0.0;
for (int i = 3;i >= 0; --i)
{
sum += u2[i];
}
return sum;
}
float index_by_complex_loop_0()
{
float prod = 1.0;
for (int i = 0;i < 4; ++i)
{
prod *= u3[i < 2 ? 0 : i];
}
return prod;
}
float index_out_of_bounds_checked_0()
{
float sum = 0.0;
for (float f = -2.3;f < 17.0; f += 3.7)
{
if (f > 0.0 && f < 16.0)
{
sum -= u4[int(f)];
}
}
return sum;
}
float4 main(float2 xy)
{
return half4(float4(index_by_literal_0(), index_by_loop_0(), index_by_complex_loop_0(), index_out_of_bounds_checked_0()));
}