Hello.
For purposes of shading (and shadow mapping in this case) I need to pass multiple shadow maps to a shader. Using many texture slots can quickly drain all the available resources, so I guessed it’s much better to pass one, bigger texture that would contain all the shadow maps layed after eachother in a rectangles let’s say 800x600.
So here comes my question: how to dynamically change viewport for rendering to texture? Something like shifting the viewport’s X and Width values for some constant value.
I’ve read about that geometry shader can do something like this, but isn’t it an overkill? I have the whole scene, I got the texture, and using a whole additional shader stage just to change viewport seemed a bit overcomplicated to me.