From 5b321e66697b901409b6b5067e7c494535ebcd11 Mon Sep 17 00:00:00 2001 From: Christophe Dehais Date: Thu, 18 Nov 2021 22:11:45 +0100 Subject: [PATCH] Subtitute texture*EXT functions emitted in WebGL 2 (#2663) --- tools/shaderc/shaderc_glsl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/shaderc/shaderc_glsl.cpp b/tools/shaderc/shaderc_glsl.cpp index b0fffde6d..b130ae75c 100644 --- a/tools/shaderc/shaderc_glsl.cpp +++ b/tools/shaderc/shaderc_glsl.cpp @@ -75,6 +75,9 @@ namespace bgfx { namespace glsl char* code = const_cast(optimizedShader); strReplace(code, "gl_FragDepthEXT", "gl_FragDepth"); + strReplace(code, "textureLodEXT", "texture2DLod"); + strReplace(code, "textureGradEXT", "texture2DGrad"); + strReplace(code, "texture2DLodARB", "texture2DLod"); strReplace(code, "texture2DLodEXT", "texture2DLod"); strReplace(code, "texture2DGradARB", "texture2DGrad");