In the following example https://www.babylonjs-playground.com/#W2N9TD#1
I am using a logarithmic depth buffer to try and work with objects at astronomical scales. (I’m simulating the solar system, and I need to scale things so that the moon is far enough away to avoid parallax issues, but the other planets are still rendered correctly )
When planets overlap, I expect the closer one to be in front, and so it is (planet1 and planet2) if the distances are not too great. When I move both planets further out, to distances in the 1E7 range, the relative distances are ignored using a logarithmic depth buffer and are rendered the wrong way round, but only when in VR on an oculus quest ( or probably other android browsers ). On a desktop, or before entering VR, it’s correct.
Now I’m guessingthis is a problem with floating point precision somewhere. But what I would like to know is:
- what exactly is the limitation on oculus - is it the shader in the graphics card or something else
- where is the available precision documented if anywhere
- is there a workaround ( custom material, different material ? )
- or should I report this as a bug?