Texture2DParameter Is there a way to turn the Repeat/Clamp options into a toggle switch and expose it externally?

Godot Version

Godot 4.5.1

Question

In Godot’s Visual Shader, I want to be able to toggle between Repeat and Clamp modes for my texture’s tiling behavior. I know that in the Texture2DParameter node, I can switch these modes by modifying the options shown in the image below. But what I need is an exposed toggle switch for this setting, and I have no idea how to do that.

It’s not possible to change these settings directly because they are part of the uniform. You can duplicate the node with the value changed and use another uniform to toggle between those two nodes.

1 Like