Jump to content
  • Advertisement
Sign in to follow this  
Alundra

End of start/end attenuation to only use inverse square falloff ?

This topic is 666 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,
Nowadays we all move to physically correct equations and remove the old methods.
One of them is the start/end attenuation using smoothstep :
float Attenuation = smoothstep( Light.EndAttenuation, Light.StartAttenuation, d );

Nowadays we only use the inverse square falloff with one tweak to avoid infinite reach, for example this method used by unreal engine :

saturate(1-(distance/radius)^4)^2/(distance^2+1)
Using the inverse square falloff the artist doesn't have control on the attenuation but the attenuation is realist.
Is it good to only use this method or a fallback on the old method is needed ?
Unreal still has a fallback on light param to use the old method, they use an exponent factor :
float NormalizeDistanceSquared = dot(WorldLightVector, WorldLightVector);
return pow(1.0f - saturate(NormalizeDistanceSquared), FalloffExponent);

Thanks

Edited by Alundra

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!