-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Closed
Description
Description
Extending from NodeMaterial, rewrite the ColorNode and PositionNode materials, and initialize multiple material objects in the same scene. Only the Node of the first one is not null, while the rest are null.
When I use a custom input parameter, such as speed, in a ColorNode or PositionNode, the last input speed data will be used globally.
I encountered this issue while using Line2NodeMaterial in webgpu_lines_fat_raycasting.html.
Reproduction steps
- Extend from NodeMaterial to implement a custom Material, such as Line2NodeMaterial.
- Modify ColorNode, PositionNode, etc.
- In the same scene, initialize multiple custom Materials.
- When executing the code in the console, you will find that it is null.
materials.forEach(material => {
console.log(material.colorNode)
})
Code
like Line2NodeMaterial
Live example
Screenshots
No response
Version
r178
Device
No response
Browser
No response
OS
No response