-
-
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
Nodes: Add more exports to ShaderNode #23901
Conversation
So, there are two problems with the circular inclusion:
Obviously these problems can be circumvented by creating one more ShaderNode file containing e.g. core, math, and basic accessors... But it is not a very reliable solution (I can easily imagine a node importing a node importing a node, so on, all of which should be exported by the ShaderNode). |
@LeviPesin I think that we can have a |
Yes, I now also think it would be better and easier (but still can cause some troubles)... OK, will do that tomorrow. |
Done. |
I think that: |
I am asking because I am not sure if something like |
I see... the |
Still not sure about the usecases... |
@sunag Maybe it would be better to merge this PR and decide later whether and how |
Seems that this PR broke |
Try test with: uniform( new THREE.Vector2() ); |
Should be fixed now. |
See this: d4cbbee maybe you need revert it too |
So, I found a workaround, but it feels quite hacky... It seems that I do not quite understand how the system of the TempNodes work... |
For this case is better use context( add( particle, velocity ), { temp: false } ) |
Thanks @LeviPesin! |
* Add more exports to ShaderNode * Fix brackets * Fix one more bracket * Fixes * Another fix * Cleanup * Fix quotes * Fixes * Fix * Another fix * One more fix * New fix * Fix utils * Cleanup * Change `func` signature * Fix * Add `storage` and `compute` * Fixes * Fix * `functionCall` -> `call` * Remove `arrayElement` * Update `compute` signature * Update webgpu_compute.html * Fix `getConstNodeType` * Workaround * Use `context` * Radians, degrees, inversesqrt * Remove 'inverseSqrt' alias
Fixes #23564
Description
This PR adds more exports to the ShaderNode.
Breaking changes:
MathNode.RAD
andMathNode.DEG
toMathNode.RADIANS
andMathNode.DEGREES
.viewMatrix
now should be used asviewMatrix()
.@sunag Not sure about how
arrayUniform()
should work, what do you suggest?