OpenGL GLSL mix() Miscompilation When Using Direct Interpolation Parameters on Intel GPUs
Content Type: Troubleshooting | Article ID: 000102994 | Last Reviewed: 07/10/2026
This problem appears in GLSL shaders where mix(vec3, vec3, float) behaves differently depending on how the float weight is provided. A direct call such as:
vec3 color = mix(a, b, 0.75);
can produce incorrect results, while a logically equivalent version using a helper:
vec3 color = mix(a, b, clamp01(0.75));
float clamp01(float x) {
return clamp(x, 0.0, 1.0);
}
yields correct behavior on affected Intel OpenGL drivers.
The shader code is spec-compliant, with matching types and valid use of clamp, and behaves correctly on other GPU vendors,
Intel is currently investigating this issue. Please contact Intel Customer Support for more information.