Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Multi-Cameras rendering

  1. #1
    Newbie Newbie
    Join Date
    Oct 2012
    Posts
    1

    Multi-Cameras rendering

    Hi.
    I am new here.
    Is there a solution for multiple cameras (300~700 in number) rendering in a scene. I solve it in a easy way by for-loop and it's time-consuming. Any better idea?

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    645
    The primary issue is that you need a different model, view, projection transformation for each camera, which means that you effectively need to duplicate primitives (triangles). You can use a Geometry Shader to achieve that: apply different model,view, projection transformations to a input triangle to get the different outputs. It's probably not realistic to handle the 300-700 cameras in one go (geometry shaders have limits on how much data they can output), but you could use it to render maybe 5-10 cameras in one pass instead of needing one pass per camera.
    However, with those numbers of cameras it's going to be difficult to be fast no matter what (at least that would be my guess - hoping to be wrong ).

  3. #3
    Junior Member Regular Contributor
    Join Date
    Dec 2009
    Posts
    197
    I guess instancing would be faster, just dump all the matrices in a UBO array and index them via gl_InstanceID in the Vertex Shader.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •