Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For custom .gltf files logarithicDepthBuffer needed #18

Open
rafelis1997 opened this issue Jun 14, 2022 · 1 comment
Open

For custom .gltf files logarithicDepthBuffer needed #18

rafelis1997 opened this issue Jun 14, 2022 · 1 comment

Comments

@rafelis1997
Copy link

Should be nice to put in the README.md that for some custom assets you need to enable logarithmicDepthBuffer in the ARCanvas gl properties or the model can show meshes overlaping each other

<ARCanvas className="AR" shadows camera={{ position: [0, 0, 2], near: 0.01, far: 1000 }} onCreated={({ gl }) => { gl.setSize(window.innerWidth, window.innerHeight); }} gl={{ alpha: true, antialias: true, precision: "highp", logarithmicDepthBuffer: true }} >

Like this

ezgif com-gif-maker

Would be nice to put in the references too the pmds documentation and gl properties

@LucusWebsites
Copy link

Can second this, took me way too long to figure out why my scene looked so bad with all the z fighting going on.

@rafelis1997 Thank you so much for sharing your piece of code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants