0
$\begingroup$

I have a scenario with several cameras. Each hold its own color and depth texture. Because the geometry of the environment is expansively procedural generated, I would like to combine cameras with same resolution and texture format, to use layered rendering. This would be a very good performance boost.

The question: Is it possible to combine multiple textures within a Framebuffer, so that when using layered rendering, each camera texture is a separate layer? I know, that when combining all camera textures to one single GL_TEXTURE_2D_ARRAY texture, I could use layered rendering. But I would like to manage them separately, because from time to time the camera positions move away from each other, so the layered rendering will not be helpful anymore. Or better several groups of cameras, which are nearby should be flexible grouped to one layered rendering call.

$\endgroup$
1
  • 1
    $\begingroup$ "But I would like to manage them separately, because from time to time the camera positions move away from each other, so the layered rendering will not be helpful anymore." Why not? The actual vertex data you use for a particular layer isn't about the way the layers are stored in the texture. $\endgroup$ Commented Mar 2, 2022 at 15:06

1 Answer 1

1
$\begingroup$

Layered rendering requires array textures, period (well, cubemaps can also work, but they're basically array textures anyway). There's no avoiding that.

But unless you need the sizes and formats of the individual "layers" to be different, there's no reason you should be unable to use array textures for this purpose.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.