I want to render an environment map into a cubemap framebuffer but I dislike the fact, that I have to use the geometry shader to set gl_Layer because the geometry shader would be a basic passthrough shader. Additionally a geometry shader could stall the pipeline and decrease performance.

I would rather like to use instanced rendering and set gl_Layer in the vertex shader but unfortunately this is only possible with the AMD_vertex_shader_layer extension.

Is there any other way to set the layer in the shader?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.