forked from Mirrors/openclonk
Fix shader compilation on old Intel drivers
See http://forum.openclonk.org/topic_show.pl?pid=28313#pid28313issue1247
parent
7f79caade5
commit
bcaa2399eb
|
@ -12,7 +12,8 @@ slice(texture+6)
|
|||
{
|
||||
#ifdef HAVE_LIGHT
|
||||
// Ambient light
|
||||
float ambient = texture2D(ambientTex, ambientTransform * vec3(gl_FragCoord.xy, 1.0)).r * ambientBrightness;
|
||||
// Extra .xy since some old intel drivers return a vec3
|
||||
float ambient = texture2D(ambientTex, (ambientTransform * vec3(gl_FragCoord.xy, 1.0)).xy).r * ambientBrightness;
|
||||
#else
|
||||
// Lighting disabled: Ambient light everywhere
|
||||
float ambient = 1.0;
|
||||
|
|
|
@ -11,7 +11,8 @@ slice(texture+4)
|
|||
{
|
||||
#ifdef HAVE_LIGHT
|
||||
// prepare texture coordinate for light lookup in LightShader.c
|
||||
vec2 lightCoord = lightTransform * vec3(gl_FragCoord.xy, 1.0);
|
||||
// Extra .xy since some old intel drivers return a vec3
|
||||
vec2 lightCoord = (lightTransform * vec3(gl_FragCoord.xy, 1.0)).xy;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue