So I am trying to programmatically generate an image, via Texture2D, for use in a shader. I do this with a custom Texture2D inherited resource that writes to an ImageTexture and outputs from that. I am able to get my custom texture to display in a TextureRect, but get weird results elsewhere.
It will not display at all if used as the Albedo of material. When plugged into the shader it was designed for, I get an inexplicable checkered pattern. When I tried to display it in a simpler shader, I found that the texture refuses to load into a Sampler2D uniform. (though it will load into a Sampler2D array uniform? See gifs.) All this leads me to believe that I am missing some critical information about how Texture2D works. Does someone with more knowledge of the innerworkings of Godot know where I can go for more information?
Thanks,