How do I use a Texture2DParameter in a VisualShader?
Asked Answered
S

1

0

VisualShaders have changed from what I remember in Godot 4.2. I want to add a texture input to my shader. I've added a Texture2DParameter node which allows me to attach an image to my shader. I can also send it as an input to Texture2D which seems to be the only relevant node that accepts a sampler as an input. However, I am getting an error saying
The sampler port is connected but not used. Consider chaning the source to 'SamplerPort'. I cannot find anything called 'SamplerPort'. How am I supposed to set this up?

Swansea answered 2/12, 2023 at 19:47 Comment(0)
C
0

Swansea As the message says, change Texture2D node's soruce to SamplerPort. It's in the first drop down in Texture2D node, not in Texture2DParameter node, the one that's set to Texture in your screenshot.

Cell answered 2/12, 2023 at 20:31 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.