Skip to content

Instantly share code, notes, and snippets.

@Bailey3D
Last active October 19, 2019 20:42
Show Gist options
  • Save Bailey3D/c5c957b3ad8ba6dabea21e4cff1c93c1 to your computer and use it in GitHub Desktop.
Save Bailey3D/c5c957b3ad8ba6dabea21e4cff1c93c1 to your computer and use it in GitHub Desktop.
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