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

Add multiscattering terms to diffuse BRDF in image-based lighting #12118

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

jjhembd
Copy link
Contributor

@jjhembd jjhembd commented Aug 9, 2024

Description

This PR adds terms to the diffuse BRDF in image-based lighting, to account for multiple scattering. The math follows a paper by Fdez-Aguera. For a somewhat more gentle introduction, see this practical summary by Bruno Opsenica.

Rendering comparison

Before this PR:
image

After this PR:
image

Some key changes to notice:

  • Brightening of rough metallic materials, due to multiple scattering.
  • Reduction of the diffuse haze on smooth materials, due to more accurate energy conservation in the new formula.
  • Less exaggerated Fresnel effect at glancing incidence on dielectric materials, again due to better energy conservation.

Issue number and link

Resolves #12028. (This is the last of a series of fixes addressing that issue).

Testing plan

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • [ ] I have added or updated unit tests to ensure consistent code coverage See Add screenshot testing for subtle lighting changes #12065
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

Copy link

github-actions bot commented Aug 9, 2024

Thank you for the pull request, @jjhembd!

✅ We can confirm we have a CLA on file for you.

@jjhembd jjhembd marked this pull request as ready for review August 9, 2024 20:45
@jjhembd jjhembd requested a review from ggetz August 9, 2024 20:46
@ggetz
Copy link
Contributor

ggetz commented Aug 12, 2024

This looks great @jjhembd! I can confirm the effect on both the metal roughness spheres and environment test, and I spot checked the other models against the glTF sample viewer.

@ggetz ggetz merged commit 80bfb86 into main Aug 12, 2024
9 checks passed
@ggetz ggetz deleted the ibl-multiscatter branch August 12, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Verify BRDF for image-based lighting
2 participants