1uniform half a, b, c; 2uniform half4 d, e; 3 4half4 main(float2) { 5 // Ensure that constant-evaluation is safe in the presence of very large values. 6 half4 result = refract(6e26, 2, 2).xxxx; 7 8 result.x = refract(a, b, c); 9 result = refract(d, e, c); 10 11 result.xy = refract(half2(1,0), half2(0,1), 0.5); 12 result.xyz = refract(half3(1,0,0), half3(0,0,1), 0.5); 13 result.xyzw = refract(half4(1,0,0,0), half4(0,0,0,1), 0.5); 14 return result; 15} 16