-
-
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
NodeMaterial: Basic BSDFs of MeshStandardMaterial and NodeBuilder simplification #22398
Conversation
Sorry the big code!! The nexts PR will be smaller packages. One question, I can remove |
I would say yes. |
Yay! |
Hmm, I think there is something wrong with the normal map code though: Screen.Recording.2021-08-24.at.11.14.13.AM.mov |
@@ -36,9 +36,11 @@ class ContextNode extends Node { | |||
|
|||
generate( builder, output ) { | |||
|
|||
const type = this.getType( builder ); |
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 seems type
is not used in this method.
const type = this.getType( builder ); | ||
const inputs = this.inputs; | ||
|
||
const shaderStage = builder.getShaderStage(); |
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.
Another unused variable.
const propertyName = builder.getPropertyName( nodeVary ); | ||
|
||
// force nodeVary.snippet work in vertex stage | ||
const flowData = builder.flowNodeFromShaderStage( NodeShaderStage.Vertex, this.value, type, propertyName ); |
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.
And here, too.
Merging this. I think we can leave the unused vars clean up for another PR. |
Thanks! Welcome back! 🤗 |
@mrdoob Thank you again!!! I am very happy to have returned. 🎉 |
MeshStandardMaterial
->roughnessNode
,metalnessNode
,normalNode
NodeBuilder
code generator and depedencies (biggest update of this PR)NormalMap
SupportMathNode
ColorSpaceNode
all three.js encoding functions (automatic use inTextureNode
)TempNode
StructNode
SupportExpressionNode
for inline codeWebGPU - Selective Lights
https://raw.githack.com/sunag/three.js/dev-nodematerial-igalia-1/examples/webgpu_lights_selective.html