4 [vertex shader passthrough]
11 float f = gl_FrontFacing ? -1.0 : 1.0;
13 // This non-obvious arithmetic is carefully crafted to try to avoid
14 // some NIR optimizations that hid a bug in the Intel compiler backend
15 // for Gfx12+ (Tigerlake and newer) GPUs. Basically, when NIR sees
17 // x = (gl_FrontFacing ? -1.0 : 1.0) * a;
21 // x = gl_FrontFacing ? -a : a;
23 // This avoids the bad code generation for the (gl_FrontFacing ? -1.0
25 f = (f + u.x) * u.y; // Remap (-1.0, 1.0) -> (0.75, 0.25)
27 gl_FragColor = vec4(0.0, f, 0.0, 1.0);
31 uniform vec2 u -2.0 -0.25
35 relative probe rgba (0, 0) (0.0, 0.75, 0.0, 1.0)
36 relative probe rgba (1, 0) (0.0, 0.75, 0.0, 1.0)
37 relative probe rgba (0, 1) (0.0, 0.25, 0.0, 1.0)
38 relative probe rgba (1, 1) (0.0, 0.25, 0.0, 1.0)