Last active
October 19, 2019 20:42
-
-
Save Bailey3D/c5c957b3ad8ba6dabea21e4cff1c93c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline float SimpleLightBloom(float3 CamPos, float3 WorldPos, float FadeDist, float FadeExp) | |
{ | |
float d = distance(CamPos, WorldPos); | |
float m = pow( (d / FadeDist), FadeExp); | |
return clamp( m, 0.0, 5.0 ); //max depends on your use case | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment