Since layered rendering with a geometry shader in OpenGL seems a bit dodgy on some drivers/hardware, I would like to substitute the functionality with my own solution. This by using a big texture as rendertarget, with for example a resolution of 300². Then simulating layered rendering by rendering to 100² chunks in the texture. With that resolution it would result in 9 tiles/layers as shown in the mockup below:
The question is; how to this with OpenGL? Supposedly with help of a geometry shader that renders the scene to the different tiles in one pass.?
There is no simple way to do it. You can use geometry shader to hack it together but it will most probably be slow, as you have to perform a lot of geometry instancing and then use the geometry shader for vertex shading as well because vertex shader is out of the game.
Basic approach to the problem:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With