I am trying to implement the layer rendering. I have some doubts. 1)Can we do layered rendering without a Geometry shader. I mean passing the layer number value from the vertex shader to the fragment shader. set gl_Layer in the fragment shader. 3)I tried setting the gl_Layer value hardcoded in the fragment shader. first, I set it to Zero and I observed the image and I saw my triangle rendered at the bottom left corner of the image. Next, I changed the gl_Layer value to 1 .but again I see it in the same place as before.
How to layer rendering works ??? and let's say I have 4 layers, all the layers will be present side by side in a single image after drawing to 4 layers??
can someone please explain this?
Thank you