diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2018-10-28 02:37:34 +0100 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2018-10-28 02:37:34 +0100 |
commit | 11815a23dca57e79e82d3f944fe563ee8ca824d6 (patch) | |
tree | d5a27690c617522d19524aedc47ea313a837df04 | |
parent | aeddb30fa38215acf8620238209cb53f5bddc28d (diff) |
Fix GLES2 automatic texture lookup in canvas
After this change the color will only be fetched if the shader code doesn't use it explicitly, to match the GLES3 behaviour.
Fixes #23179.
-rw-r--r-- | drivers/gles2/shaders/canvas.glsl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index b990384949..79d4eb2243 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -148,7 +148,10 @@ void main() { vec4 color = color_interp; +#if !defined(COLOR_USED) + //default behavior, texture by color color *= texture2D(color_texture, uv_interp); +#endif #ifdef SCREEN_UV_USED vec2 screen_uv = gl_FragCoord.xy * screen_pixel_size; |