"Custom Node" mode for Visual Shaders #7236
Sunfire-Interactive
started this conversation in
Engine Core
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Something I've found myself running into multiple times when working with visual shaders is the lack of any ability to reuse chunks of the graph without manually duplicating every time something needs to be changed.
Often I will take a certain patch of nodes and manually convert the entire thing into a custom node script, which can take time rewriting and looking up all the necessary syntax, and I imagine that a large part of why visual shaders exist is explicitly to avoid needing to write shader code by hand.
I'm not all that aware of how the system for adding custom nodes works underneath, but from my perspective as a user, it seems like it would be possible to add an extra visual shader mode that uses the same "modes" dropdown as the other types to fill in the required VisualShaderNodeCustom fields (input and output counts, names and types, custom node name and category, etc) and then embed the relevant generated code as with any other visual shader node.
Or, alternatively, there could be a separate resource type that shares the shader editor and registers a custom node in some way similar to how the script version does.
There may even be a way to implement this as some kind of addon that i'm not aware of, though I believe this is a general enough usage to be worth including as a core feature.
Beta Was this translation helpful? Give feedback.
All reactions