Tweak light extent again to improve perf
This commit is contained in:
parent
849467d281
commit
d316263660
@ -45,8 +45,8 @@ void main()
|
||||
vec3 light_pos = pseudocenter.xyz;
|
||||
vec3 light_col = col.xyz;
|
||||
float d = distance(light_pos, xpos.xyz);
|
||||
float att = energy * 200. / (1. + 33. * d + 33. * d * d);
|
||||
float max_d = 20. * energy;
|
||||
float att = energy * 20. / (1. + d * d);
|
||||
float max_d = 5. * energy;
|
||||
att *= (max_d - d) / max_d;
|
||||
if (att <= 0.) discard;
|
||||
|
||||
|
@ -86,7 +86,7 @@ vec4 ComputeClipRegion(vec3 lightPosView, float lightRadius)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
float radius = 20. * Energy;
|
||||
float radius = 5. * Energy;
|
||||
vec4 Center = ViewMatrix * vec4(Position, 1.);
|
||||
Center /= Center.w;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user