Documentation of Sampler2D

Godot Version

4.2.1

Question

Hi! Is it possible to change the values for the TEXTURE object within a shader? I’m using a community shader, which has a line similar to this:

return textureGrad(TEXTURE, uv, ddx, ddy);

I would like to be able to adjust the color of the image that’s being passed into this function, but there doesn’t seem to be much documentation (for Godot at least) about this type’s properties. Anyone have any ideas?

Here’s the documentation for TEXTURE in a canvas shader. It’s the texture applied to the shaded node, like a Sprite2D has a .texture

You can’t modify a sampler 2d, but you can sample it and then modify the resulting color