Search Issue Tracker
Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.
Postponed
Votes
0
Found in [Package]
Issue ID
1041652
Regression
No
Support for globals in CodeFunctionNode
So I need to accsess a larger set of vectors across multiple materials and shaders.
I've used Shader.SetGlobalVectorArray() in the past with code shaders, but I don't see any possiblity to accsess these values with a Vector node or with custom code node. The only way I currently see to work arround this is to pass the globals into a render texture and read the values, pixel by pixel. But this is really painfull, even 8 properties...
I think the best solution would be to allow global variables inside custom nodes, maybe like this:
This would also alow me to reuse my old code.
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Inspector elements are rendered twice when the script component is added via drag-and-drop while the HideFlags.HideInInspector property is set
- Error "Light baking failed with error code 5 (Convergence data not available while rendering lightmaps)" thrown in Console when generating lighting for specific GameObjects
- Copy and Paste options for an Animation Property value are disabled in the Right click contextual menu
- Asset is not found when searching the Label "NewLabel" in Search Window
- "Compute dispatch: missing texture ID..." and "Compute dispatch: missing UAV ID..." warnings are thrown after changing the platform in High Definition 3D template
Invertex
Apr 06, 2024 04:22
To anyone stumbling on this post, you can include globals, but you have to put it in a .hlsl file along with your custom finction and use that file for the node.
Another option is to just add a property on the left panel, and uncheck "Exposed".