Skip to content
Snippets Groups Projects
Commit 353907ba authored by David Parks's avatar David Parks
Browse files

SH-2908 Fix for incompatibility issue with GLSL 1.30

parent 124c5c38
No related branches found
No related tags found
No related merge requests found
...@@ -640,11 +640,15 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade ...@@ -640,11 +640,15 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
//backwards compatibility with legacy texture lookup syntax //backwards compatibility with legacy texture lookup syntax
text[count++] = strdup("#define texture2D texture\n"); text[count++] = strdup("#define texture2D texture\n");
text[count++] = strdup("#define texture2DRect texture\n");
text[count++] = strdup("#define textureCube texture\n"); text[count++] = strdup("#define textureCube texture\n");
text[count++] = strdup("#define texture2DLod textureLod\n"); text[count++] = strdup("#define texture2DLod textureLod\n");
text[count++] = strdup("#define shadow2D(a,b) vec2(texture(a,b))\n"); text[count++] = strdup("#define shadow2D(a,b) vec2(texture(a,b))\n");
text[count++] = strdup("#define shadow2DRect(a,b) vec2(texture(a,b))\n");
if (major_version > 1 || minor_version >= 40)
{ //GLSL 1.40 replaces texture2DRect et al with texture
text[count++] = strdup("#define texture2DRect texture\n");
text[count++] = strdup("#define shadow2DRect(a,b) vec2(texture(a,b))\n");
}
} }
//copy preprocessor definitions into buffer //copy preprocessor definitions into buffer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment