Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roughness-adjusted fresnel. #150

Merged

Conversation

shadielhajj
Copy link
Collaborator

Added a roughness-adjusted fresnel function. This function has been described by Sébastien Lagarde and others.

The rationale is as follows: "Applying Fresnel term to prefiltered cubemap has a bad effect of always showing high specular color at edge, even for rough surface.... We approximate this “fresnel attenuation” empirically by introducing a fudge factor (taking count of gloss) in fresnel equation to get pleasant visual result"

This produces significant improvements when applied to the indirect components of a PBR shader.

roughness fresnel

For more details, see Lagarde's blog post.
https://seblagarde.wordpress.com/2011/08/17/hello-world/

@patriciogonzalezvivo patriciogonzalezvivo merged commit eba1dd2 into patriciogonzalezvivo:main Jul 4, 2024
@patriciogonzalezvivo
Copy link
Owner

Nice improvement! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants