Fix world going black and white in certain locations on apple gpu (#2558)
parent
97b1ab3455
commit
8d57388a9e
|
|
@ -150,7 +150,7 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec
|
|||
float amb_da = 0.0;//ambiance;
|
||||
if (da > 0)
|
||||
{
|
||||
lit = max(da * dist_atten,0.0);
|
||||
lit = clamp(da * dist_atten, 0.0, 1.0);
|
||||
col = lit * light_col * diffuse;
|
||||
amb_da += (da*0.5+0.5) * ambiance;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe
|
|||
float amb_da = ambiance;
|
||||
if (da >= 0)
|
||||
{
|
||||
lit = max(da * dist_atten, 0.0);
|
||||
lit = clamp(da * dist_atten, 0.0, 1.0);
|
||||
col = lit * light_col * diffuse;
|
||||
amb_da += (da*0.5 + 0.5) * ambiance;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue