How to replicate CanvasTexture functionality

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By AdamActual

Hi all,

I’m wondering if it’s possible to replicate the CanvasTexture functionality with a different class, where when it’s assigned to a Sprite2D’s texture slot it seems to automatically send the texture and normal to the shader.

Is it possible to do this with my own class, as I want to include some other maps. Basically sending the normal map as NORMAL_TEXTURE automatically to the shader, or do I have to pass in uniforms?

Thanks!