Actually the layout qualifier could maybe be left out for WebGL 1, since WebGL 1 version of the extension could only support up to 2 views of the default framebuffer, and would
not support multiview rendering to texture arrays with an arbitrary number of views. However, I definitely would not want to remove the layout qualifier requirement from WebGL 2 version of the extension, since it would prevent a clean implementation of the
WebGL extension on top of native OVR_multiview. WebGL 1 support will make the extension spec quite a bit more complicated if we decide to do it. To answer Florian’s questions: The application can render only to the left buffer of the default framebuffer by choosing glDrawBuffer(GL_BACK_LEFT); The situations where both
the left and right buffers are displayed are controlled by other APIs that WebGL interacts with, such as WebVR. Displaying both halves of the stereo default framebuffer side-by-side is not in the current proposal, but this is something that an application
can also implement by other means, and is mostly useful only for debugging. Regular non-multiview FBOs are also available when the extension is on – nothing changes for them, so shadow maps etc can be rendered as usual. -Olli From: Rafael Cintron [mailto:Rafael.Cintron@microsoft.com]
When you use the extension, you can query gl_ViewID_OVR in the vertex shader to determine which view the vertex will appear. As currently speced, you will only ever see two possible values in gl_ViewID_OVR
due to the stereo context attribute. But in the future, we can add additional numbers of views.
The layout qualifier is a hint to the compiler that the shader is intended for a certain number of views. So removing it to allow the extension to be used in WebGL 1.0 should not be too detrimental.
If anything, it will give shader authors greater flexibility to use one shader for any number of views.
--Rafael From: Florian Bösch <pyalot@gmail.com> On Wed, Jan 4, 2017 at 11:08 PM, Rafael Cintron <Rafael.Cintron@microsoft.com>
wrote:
You'd effectively default to a layout of 2 views. I think that could be a mistake. It's widely recognized that a wide FOV is more immersive. At the same time very wide FOVs will
require more than 2 views to be rendered to avoid excessive distortion (due to perspective projection that pinches everything in the center and blows it up towards the edges). There's at least some HMDs that come with 4 panels, and other wide FOV HMDs might
use a 4-split projection to get around distortion issues. |