MATBUG-78 Fix for alpha lighting falloff not matching opaque lighting falloff (again).
parent
8817ecc1e3
commit
280a9d9827
|
|
@ -101,7 +101,7 @@ vec3 calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float
|
|||
float dist = d/la;
|
||||
da = clamp(1.0-(dist-1.0*(1.0-fa))/fa, 0.0, 1.0);
|
||||
da *= da;
|
||||
da *= 1.4;
|
||||
da *= 2.0;
|
||||
|
||||
|
||||
// spotlight coefficient.
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe
|
|||
float dist = d/la;
|
||||
float dist_atten = clamp(1.0-(dist-1.0*(1.0-fa))/fa, 0.0, 1.0);
|
||||
dist_atten *= dist_atten;
|
||||
dist_atten *= 1.4;
|
||||
dist_atten *= 2.0;
|
||||
|
||||
// spotlight coefficient.
|
||||
float spot = max(dot(-ln, lv), is_pointlight);
|
||||
|
|
|
|||
Loading…
Reference in New Issue