3 GL_ARB_derivative_control
5 [vertex shader passthrough]
8 #extension GL_ARB_derivative_control: require
12 float y = gl_FragCoord.y;
13 bool alt = bool(int(gl_FragCoord.x) % 2);
14 float alty = alt ? -y : y;
15 float dy = dFdyFine(alty);
16 // Alternating columns are now descending, so check the direction
17 // of the derivative based on the row we're in.
18 if (alt && dy >= 0 || !alt && dy <= 0)
19 gl_FragColor = vec4(1, 0, 0, 1);
21 gl_FragColor = vec4(0, 1, 0, 1);
26 probe all rgba 0.0 1.0 0.0 1.0