From 4f4e46edd539b0c26a6b086aa19c303b10de66b1 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 22 Jan 2019 21:56:24 -0300 Subject: Implement unpacking for compressed vertex formats on GLES2 when not supported, fixes #22957 --- drivers/gles2/shaders/scene.glsl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'drivers/gles2/shaders/scene.glsl') 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 -- cgit v1.2.3