I’m trying to transfer over a VShader that I’ve developer for a Spatial environment into a CanvasItem environment.
It’s a fairly simple shader, but I’ve cut it down through my debugging process to an extremely simple shader of Time → Vec2 Multiplier → Texture2D → Color for the sake of demonstrating this and still I’m having no luck.
In 2D (canvas items) the texture repeat setting is set to Disabled by default that’s why it stays white. In 3D (spatial) the texture repeat settings is set to Repeat by default and that’s why it jumps from white to black.
Oh, I see. It’s not possible to specify the repeat mode when using a Texture2D node directly in the visual shader. You’ll need to use a Texture2DParameter node, change the Texture2D mode to SamplerPort and connect the Texture2DParametersampler2D port to the Texture2Dsampler2D port. You’ll need to specify the repeat mode in the Texture2DParameter node. You’ll also need to setup the texture in the inspector under Shader parameters inside the Shader