Enable repeat texture in Visual Shader

Godot Version

v4.2.1.stable > Mac Silicon

Question

Hi Everyone
(first post here… a little bit excited…!)
I’m playing with visual shader and I can’t figure out how to enable “repeat_enable” for a sampler2D.
In the properties of the colorRect that contains the VisualShader, the Texture/Repeat property is enable, but does not seem to be effective.
Making a test with a gdshader script with the “repeat_enable” hint, and it works as expected.
Am I missing an hidden property ?

1 Like

(Newbie can’t post more than 2 screenshots…)

It needs to be set per-texture in the visual shader.
Use the “SamplerPort” setting in the Texture2D node and use a Texture2DParameter node to input your texture parameters. You can set Repeat to enabled there.

Example:

(you may also want to set the type to “Color” instead of “Data”)

2 Likes

THANK YOU !!! :partying_face:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.