[Public WebGL] WEBGL_multiview discussion

Olli Etuaho [email protected]
Mon Jan 9 10:18:35 PST 2017

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.


From: Rafael Cintron [mailto:[email protected]]
Sent: sunnuntaina 8. tammikuuta 2017 22.55
To: Florian Bösch <[email protected]>
Cc: Olli Etuaho <[email protected]>; Mark Callow <[email protected]>; Maksims Mihejevs <[email protected]>; public webgl <[email protected]>
Subject: Re: [Public WebGL] WEBGL_multiview discussion

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.


From: Florian Bösch <[email protected]<mailto:[email protected]>>
Sent: Wednesday, January 4, 2017 2:18 PM
To: Rafael Cintron
Cc: Olli Etuaho; Mark Callow; Maksims Mihejevs; public webgl
Subject: Re: [Public WebGL] WEBGL_multiview discussion

On Wed, Jan 4, 2017 at 11:08 PM, Rafael Cintron <[email protected]<mailto:[email protected]>> wrote:
If the layout qualifier prevents the shader from working in WebGL 1.0, I think we should drop the qualifier requirement.  This will allow the shader to be used in more places and remove the additional overhead/complexity of rationalizing the number of views in the qualifier with the state of the world on the API side.
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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20170109/887e59b7/attachment.html>

More information about the public_webgl mailing list