Needing only left-eye & right-eye canvas & vr controller

I would like to draw my own content on a left-eye canvas and on a right-eye canvas. Also be able to use the vr controllers.
My content is created in 3840 x 2160. What resolution is at the moment optimal? (Oculus quest 2)
I hope someone can show me which (small) part of Babylon.js I could use to do this. Thanks a lot!

The resolution is provided by your headset and is being set automatically by the XR session manager and the experience helper. There is no need to set the resolution on your own.

If you use the webxr default experience you get everything out of the box - WebXR Experience Helpers | Babylon.js Documentation

Thank you for replying!

I would like to deliver just some left-eye graphics (canvas) and some right-eye graphics (canvas) without WebGL. I did some extensive search but always WebGL showed up.
I saw in the babylon.js code a nullengine and a thinengine. Is it possible to use that for my goal?

not quite sure what you mean :slight_smile:

WebGL will be used to render WebXR scenes no matter what. You can split your canvas yourself, right in the middle, and have a kind of “right canvas left canvas” thing going on, but still, for rendering you will need WebGL (or any other rendering engine like WebGPU)

The nullengine will not render. it is meant for game logic on the server (for example).

BTW - even if you split a canvas and deliver it to a headset (not sure how, but let’s say you are theoretically able to do that), the projection will be incorrect and the image will be distorted in the headset. WebXR solves it for you, but again - WebXG requires webgl.

I have some JavaScript code ready that makes both left and right eye graphics. And those graphics are interactive so it would suit me best to have less as possible needless calculations.
If I could have a canvas via Babylon.js that shows up in my Oculus quest I could start experimenting, it does not matter if it is distorted, maybe I can correct that with some calculations.

you can’t go “full screen” without WebXR… It might work on a google cardboard (i.e. go full screen), but to enter immersive mode, where your transformation is tracked you need webxlr ( and webgl)

Hello @Aldeboarn77 just checking in, do you have any further questions? :slight_smile: