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: Multiview framebuffer targets

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Newbie Newbie
    Join Date
    Dec 2017
    Posts
    2

    Multiview framebuffer targets

    I'm experimenting with OVR_Multiview on Android OpenGL ES and I'm struggling to understand some of the concepts.

    The plan is to use multiview to make stereo rendering more efficient, so the left and right renderings would be side-by-side.

    1. Can you render directly to the output framebuffer with multiview or does it have to be a bound texture?
    2. If you have to set the viewport to the whole output buffer, how do you offset the two views? i.e. what stops it rendering twice across the whole viewport?

    For background, I would rather render to the screen directly than incur the cost of an intermediate texture buffer and I'm writing at the Android SDK / Java level with direct calls to OpenGL and raw shader code (no libraries or fancy abstractions).

    Apologies if I'm missing something obvious, but it's not exactly well documented and the "spec" reads like robot barf.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,576
    Quote Originally Posted by rupert View Post
    I'm experimenting with OVR_Multiview on Android OpenGL ES and I'm struggling to understand some of the concepts.

    The plan is to use multiview to make stereo rendering more efficient, so the left and right renderings would be side-by-side.

    1. Can you render directly to the output framebuffer with multiview or does it have to be a bound texture?
    It has to be a bound texture. Specifically, a 2D array texture.
    Quote Originally Posted by rupert View Post
    2. If you have to set the viewport to the whole output buffer, how do you offset the two views? i.e. what stops it rendering twice across the whole viewport?
    Each view is rendered to one layer of a 2D array texture. The effect is as if you'd performed exactly the same sequence of rendering operations multiple times, each time to a different texture layer. The only vertex shader output which is allowed to change between views is gl_Position, so you're effectively limited to drawing the same scene with different transformations.

    Combining the views for output isn't addressed by the extension.

  3. #3
    Newbie Newbie
    Join Date
    Dec 2017
    Posts
    2
    Quote Originally Posted by GClements View Post
    It has to be a bound texture. Specifically, a 2D array texture.

    Each view is rendered to one layer of a 2D array texture. The effect is as if you'd performed exactly the same sequence of rendering operations multiple times, each time to a different texture layer. The only vertex shader output which is allowed to change between views is gl_Position, so you're effectively limited to drawing the same scene with different transformations.

    Combining the views for output isn't addressed by the extension.
    Thanks for clarifying and for the quick response.

    This makes multiview very useful for the 2-step rendering process normally employed for lens correction, which is arguably the core use case. It's less useful in my specific situation, where I would prefer to write straight to the screen and I would be trading one two-step process for another. I'll run some benchmarks at least.

Posting Permissions

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