Browse Source

Subtitute texture*EXT functions emitted in WebGL 2 (#2663)

Christophe Dehais 4 years ago
parent
commit
5b321e6669
1 changed files with 3 additions and 0 deletions
  1. 3 0
      tools/shaderc/shaderc_glsl.cpp

+ 3 - 0
tools/shaderc/shaderc_glsl.cpp

@@ -75,6 +75,9 @@ namespace bgfx { namespace glsl
 			char* code = const_cast<char*>(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");