Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. float SchlickGGXGeometricShadowingFunction (float NdotL, float NdotV, float roughness)
  2. {
  3. float k = roughness / 2;
  4.  
  5. float SmithL = (NdotL)/ (NdotL * (1- k) + k);
  6. float SmithV = (NdotV)/ (NdotV * (1- k) + k);
  7.  
  8. float Gs = (SmithL * SmithV);
  9. return Gs;
  10. }
  11.  
  12. GeometricShadow *= SchlickGGXGeometricShadowingFunction (NdotL, NdotV, roughness);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement