From 2d57ec24609687756597cce1e47ea4712dea2666 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 23 Jan 2019 17:06:37 -0300 Subject: [PATCH] Fix problem with texture2Dlod, closes #25263 --- drivers/gles2/shaders/canvas.glsl | 5 ++++- drivers/gles2/shaders/cubemap_filter.glsl | 4 +++- drivers/gles2/shaders/scene.glsl | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index 45d26e7254b..bc734a65973 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -223,16 +223,19 @@ VERTEX_SHADER_CODE #define textureCubeLod(img, coord, lod) textureCubeLodEXT(img, coord, lod) #endif +#endif + #ifdef GL_ARB_shader_texture_lod #extension GL_ARB_shader_texture_lod : enable #endif + #if !defined(GL_EXT_shader_texture_lod) && !defined(GL_ARB_shader_texture_lod) #define texture2DLod(img, coord, lod) texture2D(img, coord, lod) #define textureCubeLod(img, coord, lod) textureCube(img, coord, lod) #endif -#endif + #ifdef USE_GLES_OVER_GL diff --git a/drivers/gles2/shaders/cubemap_filter.glsl b/drivers/gles2/shaders/cubemap_filter.glsl index c9a0fd4ba26..558c83960e2 100644 --- a/drivers/gles2/shaders/cubemap_filter.glsl +++ b/drivers/gles2/shaders/cubemap_filter.glsl @@ -33,6 +33,8 @@ void main() { #define textureCubeLod(img, coord, lod) textureCubeLodEXT(img, coord, lod) #endif +#endif + #ifdef GL_ARB_shader_texture_lod #extension GL_ARB_shader_texture_lod : enable #endif @@ -42,7 +44,7 @@ void main() { #define textureCubeLod(img, coord, lod) textureCube(img, coord, lod) #endif -#endif + #ifdef USE_GLES_OVER_GL #define lowp diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index 148b5ae7efa..6aa91df20f1 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -664,6 +664,8 @@ VERTEX_SHADER_CODE #define textureCubeLod(img, coord, lod) textureCubeLodEXT(img, coord, lod) #endif +#endif + #ifdef GL_ARB_shader_texture_lod #extension GL_ARB_shader_texture_lod : enable #endif @@ -673,7 +675,7 @@ VERTEX_SHADER_CODE #define textureCubeLod(img, coord, lod) textureCube(img, coord, lod) #endif -#endif + #ifdef USE_GLES_OVER_GL