I have a scene with normal Standard Material meshes, custom shaders and lines. In the browser (also with the simulated VR cam) it show up fine. On the Quest it works fine as well, however if I turn on Multiview the axis/lines and custom shaders on not visible. The simplest case is is here. Note its fine in the browser, even in Firefox Reality on the Quest, but as soon as you go click the VR headset icon it is not longer visible.
Yeah multiview is complicated to implement as you need to update your shader to take care of the specific info that are required by the multiview extension.
First you need to add #extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in at the beginning of your shader
then you need to know that you will receive 2 viewProjection matrices like here:
What we do automatically for you is that if your defines contain “MULTIVIEW” we will add the extension declaration
then you need to test for #ifdef MULTIVIEW and add the shader code:
effect.js?67a6:344 Uncaught TypeError: Cannot read property '0' of undefined
at Effect.getAttributeLocation (effect.js?67a6:344)
at Engine._bindVertexBuffersAttributes (engine.js?a942:2069)
at Engine.recordVertexArrayObject (engine.js?a942:2106)
at Geometry._bind (geometry.js?ca4e:299)
at Mesh._bind (mesh.js?c003:1134)
at Mesh.render (mesh.js?c003:1410)
at SubMesh.render (subMesh.js?0b55:272)...
My guess is I’d need to use layout everywhere for this to work. Is that correct?