Giter Club home page Giter Club logo

Comments (6)

De-Panther avatar De-Panther commented on May 21, 2024

Thanks :)

And interesting.
I won't recommend adding any post-process to WebGL.
But when you create the WebGL context, there's "antialias" WebGLContextAttributes.
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getContextAttributes
I think that by default it's false.
You can check webxr.jspre in the Assets/WebXR/Plugins folder, where we set xrCompatible to true, you can try and add antialias true as well.
Please update if it worked.

Also, which browser did you try?

from unity-webxr-export.

De-Panther avatar De-Panther commented on May 21, 2024

Another option that might help you, is setting LayerInit attributes for the XRWebGLLayer.
It has options for antialias and framebufferScaleFactor.

You can check Framebuffer Scaling here:
https://immersive-web.github.io/webxr-samples/framebuffer-scaling.html

In webxr.js, when calling updateRenderState you can add those attributes.

from unity-webxr-export.

zer0grand avatar zer0grand commented on May 21, 2024

Cool thanks! Also I was using Firefox.

from unity-webxr-export.

De-Panther avatar De-Panther commented on May 21, 2024

Did you tried one of those options? Did it help?

from unity-webxr-export.

zer0grand avatar zer0grand commented on May 21, 2024

I tried the first one and it didn't work. I took a look at the second one and the immersive-web link showed no difference on my headset when sliding the bar around... Then I saw https://developer.mozilla.org/en-US/docs/Web/API/XRSession/updateRenderState where it says that Firefox unfortunately doesn't support updateRenderState. (I'm using Firefox with an original Vive- for some reason Chrome XR doesn't work for me) 😢 While I wanted antialiasing I also wanted a bunch of other post-processing effects, so I'm thinking of keeping it closed if it's not recommended. If you find a way though please let me know!

from unity-webxr-export.

De-Panther avatar De-Panther commented on May 21, 2024

To run WebXR on Chrome, you'll need to make sure that it isn't running (not even on background on Task Manager), and run it with the commands "--no-sandbox --test-type". You'll might want to set the #webxr-runtime flag in the Chrome flags, to select which headset to use.

I won't recommend post-processing for optimization reasons:
As far as I know, only part of the general Unity post-processing effects are available for VR.
As this is not an official Unity extension, it doesn't have some optimizations that official ones have (e.g. single pass rendering).
Then there's WebGL and post-processing, as WebGL runs slower than native OpenGL equivalent, as it has some overhead for some of the GL calls for security reasons.

BUT you still can try and use some of them. As long as you manage to keep the recommended frame rate for each headset, that's what matters.

from unity-webxr-export.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.