Remainder from hlsl PT and stuff moved out of bxdf unit test#980
Merged
devshgraphicsprogramming merged 26 commits intomasterfrom Feb 12, 2026
Merged
Conversation
…d change to compile time depth
…_path_tracing_stuff
Contributor
Author
|
|
Comment on lines
203
to
+207
| const scalar_type NdotL = hlsl::mix(scalar_type(2.0) * VdotH * localH.z - NdotV, | ||
| localH.z * (VdotH * rcpEta.value[0] + LdotH) - NdotV * rcpEta.value[0], transmitted); | ||
| // VNDF sampling guarantees that `VdotH` has same sign as `NdotV` | ||
| // and `transmitted` controls the sign of `LdotH` relative to `VdotH` by construction (reflect -> same sign, or refract -> opposite sign) | ||
| if (ComputeMicrofacetNormal<scalar_type>::isTransmissionPath(NdotV, NdotL) != transmitted) | ||
| if (hlsl::isnan(NdotL) || ComputeMicrofacetNormal<scalar_type>::isTransmissionPath(NdotV, NdotL) != transmitted) |
Member
There was a problem hiding this comment.
how is it possible for you to get a NaN NdotL ?
VdotH, localH.z or what else is nan beforehand?
There was a problem hiding this comment.
IMHO the NAN can only come from here
and thats where you should detect and bail from, so you:
- save yourself computing
NdotLhere - doing this NaN check for BRDFs (affects only BSDFs)
There was a problem hiding this comment.
you can asset that NdotL is not NaN just before the If though.
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.
No description provided.