0 votes


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.

in Engine by (14 points)

You can always script shaders the "normal" way.
Parameters can be passed as uniform.
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

+1 vote

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.

by (1,385 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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.