SH-2681 Fix for shader compiler error on GLSL 1.30 and later
parent
ab7a85602f
commit
bbac7e9aec
|
|
@ -618,7 +618,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
|
|||
//backwards compatibility with legacy texture lookup syntax
|
||||
text[count++] = strdup("#define textureCube texture\n");
|
||||
text[count++] = strdup("#define texture2DLod textureLod\n");
|
||||
text[count++] = strdup("#define shadow2D texture\n");
|
||||
text[count++] = strdup("#define shadow2D(a,b) vec2(texture(a,b))\n");
|
||||
}
|
||||
|
||||
//copy preprocessor definitions into buffer
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl)
|
|||
stc.xyz /= stc.w;
|
||||
stc.z += spot_shadow_bias*scl;
|
||||
|
||||
float cs = shadow2D(shadowMap, stc.xyz);
|
||||
float cs = shadow2D(shadowMap, stc.xyz).x;
|
||||
float shadow = cs;
|
||||
|
||||
vec2 off = 1.5/proj_shadow_res;
|
||||
|
|
|
|||
Loading…
Reference in New Issue