I have two materials and blending these two. One is for the ground (terrain/map) and applied 3 ground textures on it. And the other one is showing some magic textures.
I’d like to render this magic texture multiple times on the material. For example, it will be rendered in the position [10, 10] for character #1, and the other magic texture will be rendered in the position [20, 20] for character #2.
diffuseMapOffset can’t help here because I need to render multiple times the same texture in different locations. diffuseMapOffset only helps if you need one texture, if I go with this path I need to create multiple materials for multiple textures so it’s not ideal IMHO.
You could also clone the terrain many times, and use simple shader on it with emissive texture, and use texture transform to move your texture to where you need to.
you currently have a uniform for playerPosition. Have 5 of those uniforms.
And clone the code you have to use that uniform.
But this will be hard to extend to 70 … the cost would be crazy high.
If you need 70 or so, clustered lights sound like a great option.
The other way could be to have dynamic mesh for each projected image - it should only contain few triangles where needed, instead of whole terrain.