Correct anisotropic Smith masking equation - #3015
Open
tdavidovicNV wants to merge 1 commit into
Open
Conversation
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.
While reviewing #2964, I found that the anisotropic GGX masking-shadowing equation first reduces
alpha_xandalpha_yto their geometric mean. This removes the azimuthal dependence fromG2, even though the NDF immediately above it is anisotropic.This PR updates the specification to use the direction-dependent projected roughness from Heitz 2014 and the corresponding height-correlated Smith term, following the OSL testrender and the current state of the art. It reduces to the existing scalar equation when
alpha_x = alpha_y.For
alpha_x = 0.1,alpha_y = 0.8, and incident and outgoing directions 60 degrees from the normal:G2G2This does not change any of the actual implementations, and adds an implementation note to the spec:
sqrt(alpha_x * alpha_y), matching the current specification but discarding the anisotropic azimuth.testrender): MaterialX delegates to a native dielectric closure. The BSDL implementation used bytestrenderevaluates anisotropic height-correlated Smith masking, matching the proposed equation.df::microfacet_ggx_smith_bsdf. The current NVIDIA MDL SDK preserves the anisotropic dependence but uses the separable productG1(wi) * G1(wo), rather than height-correlatedG2.Heitz, Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs, equations 80, 86, and 99.