I’m using defold 1.9.2
I use individual shadow maps for each light source.
I realized that I can declare a sampler in the shader program in this way:
uniform sampler2D light_shadow_map[MAX_LIGHTS];
Each shadow map is a RenderTarger that is rendered in a render script. How can I pass them to the shader? render.enable_texture
will not work here. This is a rather trivial task, but I have not been able to find an answer to this question.
Using sampler2DArray seems limited too, I would like to avoid using atlases, especially in my case even that is not suitable since all my render targets are not resources and are created in rantime.
Are there any ideas on this? Thanks!