I was trying to use a rendertarget for rendering mutiple viewports, but it looked like that there is a bug in three.js when using setScissor, and setViewPort methods.
I debugged, and found that even if you set the desired viewport to both the functions, later the viewport is modified while the setRenderTarget method is called internally.
So, for now I found a solution where I directly change the following properties of renderTarget::
renderTarget.viewport.set(desiredViewport) renderTarget.scissor.set(desiredViewport) renderTarget.scissorTest = true
Note that all the above are needed in order to render the viewports correctly. Even if you set renderer.setScissorTest( true ), and don’t set the scissorTest to true on renderTarget, there are issues.
May be I am missing something, or there is a better solution?