Skip to content

Instantly share code, notes, and snippets.

@Shell64
Last active October 18, 2015 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shell64/5d12f50b4a0cabc08900 to your computer and use it in GitHub Desktop.
Save Shell64/5d12f50b4a0cabc08900 to your computer and use it in GitHub Desktop.
Geometric Shadowing term G (Schilik using UE4 roughness)
// Geometric Shadowing term G (Schilik using UE4 roughness)
float k = alpha / 2.0;
float GL = dotNL / (dotNL * (1.0 - k) + k);
float GV = dotNV / (dotNV * (1.0 - k) + k);
float G = GV * GL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment