diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-01-22 21:56:24 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2019-01-22 21:57:09 -0300 |
commit | 4f4e46edd539b0c26a6b086aa19c303b10de66b1 (patch) | |
tree | f76121bb008116561146d0537b1507a2e77f9c15 /drivers/gles2/shaders/scene.glsl | |
parent | 42ce497e7917e2bbea7c71b82d04837cc23a7396 (diff) |
Implement unpacking for compressed vertex formats on GLES2 when not supported, fixes #22957
Diffstat (limited to 'drivers/gles2/shaders/scene.glsl')
-rw-r--r-- | drivers/gles2/shaders/scene.glsl | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index b2b9458ed2..148b5ae7ef 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -655,13 +655,27 @@ VERTEX_SHADER_CODE /* clang-format off */ [fragment] + +#ifndef USE_GLES_OVER_GL + +#ifdef GL_EXT_shader_texture_lod +#extension GL_EXT_shader_texture_lod : enable +#define texture2DLod(img, coord, lod) texture2DLodEXT(img, coord, lod) +#define textureCubeLod(img, coord, lod) textureCubeLodEXT(img, coord, lod) +#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 -#ifndef GL_ARB_shader_texture_lod -#define texture2DLod(img, coord, lod) texture2D(img, coord) -#define textureCubeLod(img, coord, lod) textureCube(img, coord) #endif + #ifdef USE_GLES_OVER_GL #define lowp #define mediump |