react-three-arjs icon indicating copy to clipboard operation
react-three-arjs copied to clipboard

For custom .gltf files logarithicDepthBuffer needed

Open rafelis1997 opened this issue 2 years ago • 1 comments

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

rafelis1997 avatar Jun 14 '22 21:06 rafelis1997

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!

LucusWebsites avatar Nov 24 '22 09:11 LucusWebsites