Compare commits

...

1 Commits

Author SHA1 Message Date
Matthias Clasen
2f5076dfdc gles: Fix texture color confusion
We lack GL_BGRA in gles, so we have to swap
channels in the shader.

Fixes the blue rose.
2020-09-23 13:38:08 -04:00

View File

@@ -77,11 +77,21 @@ rounded_rect_coverage (RoundedRect r, vec2 p)
}
vec4 Texture(sampler2D sampler, vec2 texCoords) {
vec4 res;
float c;
#if defined(GSK_GLES) || defined(GSK_LEGACY)
return texture2D(sampler, texCoords);
res = texture2D(sampler, texCoords);
#else
return texture(sampler, texCoords);
res = texture(sampler, texCoords);
#endif
#if defined (GSK_GLES)
c = vec4.w;
vec4.w = vec4.z;
vec4.z = c;
#endif
return res;
}
#ifdef GSK_GL3