-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Normal.js: Improve JSDoc #31341
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
Merged
Merged
Normal.js: Improve JSDoc #31341
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word "transformed" was removed. Is that OK, or do you want the word restored?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its ok for me. If we are going to remove the term transformed, I think it would be better to modify the description of nodes with the *Geometry suffix so that it is explicit that they are not modified with skinned or morph.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is why I removed the term.
And I mentioned this because with this PR
normalViewandnormalViewGeometrynow have identical descriptions -- as donormalWorldandnormalWorldGeometry.I do not know how to describe the accessors having the *Geometry suffix. With the exception of the three.js roughness calculation, I am not aware of any other use cases in the literature where one would need them.
This is why I asked if you would consider removing them, and using them only internally. That would be my preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is definitely something very specific and I think each engine assigns a name to it, Unreal uses Pre-Skinned Normal for similar purpose and gives some examples using tri-planar texture here. I think it is useful that we have it, as we saw this was used to optimize the code in some examples like
webgpu_tsl_earth,webgpu_reflectionand the background shader, so it is positive.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunag OK. Do you like the Pre-Skinned terminology? I can refer to it as the "pre-skinned vertex normal of the currently-rendered object in view space."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d like it to be automatic for the user to understand that the
Geometrysuffix does not process vertices for skinned, morphed, or custom transformations.Pre-Skinnedseems to only refer to skinned meshes. Maybe we could add something like this?This is present in other places as well as
positionGeometry.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunag Unfortunately, this is leading to more questions for me..
Rather than continuing with this back-and-forth, I'd prefer to merge this PR for now, and then wait for you to add clarifications in a follow-up PR. Hopefully, I will then be able to better understand your intentions. 🙏