Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
donmccurdy
reviewed
Nov 24, 2025
|
|
||
| // Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2 | ||
| // https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf | ||
| // Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs" |
Collaborator
There was a problem hiding this comment.
It doesn't seem like this function's implementation has changed, and the previous link gave a specific location in the paper, where the new link is a 60-page document. Perhaps the old link could be kept, or a more specific section of the new paper referenced?
This was referenced Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR improves the physical accuracy of the
MeshPhysicalMaterialshader (WebGL) andPhysicalLightingModel(WebGPU) by updating the visibility term and diffuse energy conservation logic.Changes
1.0 - totalScatteringDielectric) rather than using the maximum component. This is more physically correct, particularly when interacting with colored specular effects like Iridescence.saturate()fromV_GGX_SmithCorrelated_Anisotropicas the visibility term is mathematically bounded.These changes align the shader more closely with ground-truth physical models and improve visual fidelity across both renderers.
(Made using https://jules.google/ and https://antigravity.google/)