0 votes

Hey,

I was trying out the new* visuelshader by trying to recreate some of my shaders in it.
Unfortunately, I very quickly ran into a issue that I couldn't figure out how to solve.
I couldn't find a way to allow for custom inputs for the shadder from my code.
A lot of my shaders (and most shaders in general) need more information than just the premade inputs allow for.
Is this just not added yet and is planned for a future update and I should just stick to coding my shaders until then? Or am I just missing something.

Thanks for your help.

asked Mar 19, 2019 in Engine by Tyler Gregorcyk (14 points)

You can always script shaders the "normal" way.
Parameters can be passed as uniform.
https://docs.godotengine.org/en/3.0/tutorials/shading/shading_language.html
Edit: Oops, you meant that with "coding". And I'd say yes to that. Would be nice to see Godot generating godot shader scripts from the visual part though.

I don't use Visual Shadeds therefore I don't know how and if uniforms are present there.

1 Answer

0 votes

Uniforms are also available to visual shaders. They can be added like any other node. They're located more towards the bottom of the list of available nodes (might need to scroll the list to see them). They act just like uniforms in shader code.

answered Mar 20, 2019 by omggomb (691 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.