-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
MeshBasicNodeMaterial: Fix transformedNormalView
.
#28839
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
@@ -16,7 +16,7 @@ class MeshBasicNodeMaterial extends NodeMaterial { | |||
this.isMeshBasicNodeMaterial = true; | |||
|
|||
this.lights = true; | |||
//this.normals = false; @TODO: normals usage by context |
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.
normals usage by context
I could not find reference of normal usage over the context object. Is this TODO still relevant?
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 reason was to remove some possible duplicate operations in normals
that might occur in this configuration.
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.
If you can share an example where duplicate operations might occur, I would be curious to debug this situation 🤓 .
Otherwise I think we should ensure the correct feature set of the materials first before we apply optimizations. Right now, you could apply a normal map to MeshBasicMaterial
and it would affect the environment map sampling which isn't ideal.
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.
If you can share an example where duplicate operations might occur, I would be curious to debug this situation
I think it might take a while for me to check this since it would be easier for me to do the tests again than to find the files.
you could apply a normal map to MeshBasicMaterial and it would affect the environment map sampling which isn't ideal.
For this case I would suggest create a MeshBasicNodeMaterial.setupNormal()
for modify this default behavior.
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.
Okay, there is now an overwritten version of setupNormal()
in MeshBasicNodeMaterial
next to a comment that refers to this PR.
normals
to false
.transformedNormalView
.
Related issue: -
Description
This makes sure
MeshBasicNodeMaterial
does not react on normal or bump maps by overwriting the computation oftransformedNormalView
.