Jump to content

Aliasing in VR mode


Converge
 Share

Recommended Posts

Hey everyone, 

We are building an environment that contains many thin lines and grills. While in normal mode everything looks fine (with Babylon's AA enabled), however after entering the VR mode (using the VRhelper) jagged edges become very apparent to the point that it's impossible to distinct some of the details. I have made a few screenshots with test environment to demonstrate the problem. Solutions like FXAA plugged to post processing pipeline make everything blurrier and worse. I'm wondering why is it happening (stereo cameras are super low-res?) and is there a way to deal with it? It would be ok to take some performance hits and render everything internally in much higher resolution for example. What are the good practices for fighting the jagged edges in VR in general? 

Many thanks in advance! 

VR_fullscreen.png

normal_mode_fullscreen.PNG

Link to comment
Share on other sites

Hi, 

Welcome to the forum!

I have a question - is it blurred inside the glasses, or outside on the screen?

The VR devices have relatively good resolution nowadays. Could always be better, but should look fine. And as you are using the same canvas, AA should be the same as in a regular scene. The issue here, however, is that WebVR forces us to resize the canvas to the resolution of the VR device before streaming the data. Meaning, the canvas's size changes, but not its real screen size. you can pack a 1000x1000 canvas in a 100x100 pixels container - it will look very bad on the screen, but will still look ok in the glasses.

Link to comment
Share on other sites

22 hours ago, RaananW said:

Hi, 

Welcome to the forum!

I have a question - is it blurred inside the glasses, or outside on the screen?

The VR devices have relatively good resolution nowadays. Could always be better, but should look fine. And as you are using the same canvas, AA should be the same as in a regular scene. The issue here, however, is that WebVR forces us to resize the canvas to the resolution of the VR device before streaming the data. Meaning, the canvas's size changes, but not its real screen size. you can pack a 1000x1000 canvas in a 100x100 pixels container - it will look very bad on the screen, but will still look ok in the glasses.

Hey, thanks for the welcome! Original canvas takes 100% of the page so it's technically a fullscreen. Pixel count shouldn't be a problem here as far as I understand. Lines looked very jagged both on my display and windows mixed reality device (2k monitor, 1440x1440 per eye on mixed reality). 

22 hours ago, max123 said:

Same thing happens with VRDeviceOrientationFreeCamera, when compensateDistortion is set to true: antialiasing is just gone.

Yes, disabling compensateDistortion in the constructor resulted in everything looking nice back again. 

18 hours ago, Deltakosh said:

compensateDistortion has to rely on postprocesses and unless you are on webgl2 we cannot enable antialiasing on them

Could you please elaborate what's the problem here? PostProcess pipeline conflict? And how WebGL2 helps us to solve it? Would love to have a better understanding of this :)

Thanks everyone! 

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...