-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Refactor VarNode
#26821
Refactor VarNode
#26821
Conversation
We need a |
Can you please add it to this PR? |
I've already started developing it, as soon as it's ready I'll publish it, I'm doing it in a new PR to make it easier. |
@sunag Can you please tell how to fix this PR with the new change? |
There are more changes to be made here, as soon as possible I will publish a new PR. |
@@ -42,7 +42,7 @@ class HemisphereLightNode extends AnalyticLightNode { | |||
|
|||
const irradiance = mix( groundColorNode, colorNode, hemiDiffuseWeight ); | |||
|
|||
builder.context.irradiance.addAssign( irradiance ); | |||
builder.stack.addAssign( builder.context.irradiance, irradiance ); |
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 I think you missed this in your PR?
@sunag Rebased this PR for the latest changes (most changes from this PR were incorporated into yours, but not all), it should work now. |
Thanks! |
Fixes #26820
Also helps #26795
Description
Refactor
VarNode
(also move some defaults fromVarNode.generate()
toNodeBuilder.getVarFromNode()
). Also removereplaceNode
argument fromNode.traverse()
callback signature.Currently this (more specifically, lighting) does not work -- I think it is so because the nodes from lighting context are referencing nodes from the builder's stack which have not been built to that time yet. I tried to fix this by explicitly building the stack in ContextNode, but it still didn't work, and I don't really understand stacks and contexts theme deep enough to debug it... @sunag Can you please help with this?