Visual Shader - this is why subgraphs(like in Blender) might be helpfull

Hello, im new in Godot.

Godot 4.2.1

Currently made simple terrain with 200 lines of code(+v-shaders) + editor 300 lines of code
All terrain is just plane with subdivision edited by vertex and frag shaders.

Everything is cool, but when i tried utilize Godot Visual Shader i see a big issue here.

Look below:

this is just 2 materials, but want blend 8 of them.

Repeating this part nodes 8 times is possible, but very bad looking.

what i need it for is blending terrain materials:

i seen there was on github idea with “subgraphs”

Would like to point out that:
it seems very important feature for any Bigger Visual Shaders

Ofc there is possibility of creating this in shader code instead Visual(i already got part as custom node anyway)

But then why use Visual shader? I would expect visual shader to give possibility to avoid dupplicated nodes there.

Did other people didnt experienced need for subgraphs for visual shader?

I would really like to see this functionality in Godot. Visual shaders are great for simple things, but if a shader is to be a bit more complex, the graph becomes quite unclear. Subgraphs would be a great solution.

2 Likes