1 # From the GLSL 1.30 spec:
3 # Selects which vector each returned component comes
4 # from. For a component of a that is false, the
5 # corresponding component of x is returned. For a
6 # component of a that is true, the corresponding
7 # component of y is returned. Components of x and y that
8 # are not selected are allowed to be invalid floating point
9 # values and will have no effect on the results.
18 gl_Position = gl_Vertex;
23 uniform float a, b, zero, one;
24 uniform bvec4 selector;
28 float inf = one / zero;
29 float nan = zero / zero;
31 vec4 arg0 = vec4(a, b, inf, nan);
32 vec4 arg1 = vec4(inf, nan, a, b);
34 gl_FragColor = mix(arg0, arg1, selector);
40 uniform float zero 0.0
42 uniform ivec4 selector 0 0 1 1
45 probe all rgba 0.25 0.75 0.25 0.75