Logarithmic Depth Artifacts
See original GitHub issueDescription of the problem
Logarithmic depth appears to be broken in three@0.109.0
. Possibly related: #17442.
On my system, I see lots of depth artifacts in setups that use logarithmicDepthBuffer
. I don’t know if this problem is hardware-related; would be cool if someone could verify!
Screenshots
logarithmicdepthbuffer example
I get the same artifacts in one of my projects where I use logarithmic depth for testing purposes:
r108 (worked fine) | r109 (broken) |
---|---|
Three.js version
- Dev
- r109
- r108
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
- Edge
OS
- All of them
- Windows 10 Pro, 64-bit
- macOS
- Linux
- Android
- iOS
Hardware Requirements (graphics card, VR Device, …)
GPU: NVIDIA GTX 1060 6GB
Drivers
Graphics Driver: 436.30 (Standard Type)
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (4 by maintainers)
Top Results From Across the Web
Logarithmic Depth Buffer - Game Developer
Using logarithmic depth buffer to get rid of Z-fighting and near plane clipping in large-scale planetary rendering.
Read more >Antialiasing has artifacts when logarithmic depth buffer is ...
When the logarithmic depth buffer is enabled, antialiasing fails in areas where geometry intersects or lines up. See screenshot below.
Read more >Depth flickering artifacts with logarithmic depth buffer - OpenGL
We use logarithmic depth buffer for our project. However, distant objects will still blink or flicker when they become 1, 2 pixels in...
Read more >Logarithmic Depth Buffer - Outerra
The boundary was floating, somewhere around 5km - quad-tree tiles up to certain level were using the distant part, and the more detailed...
Read more >Hybrid Multi-Frustum Logarithmic Depth Buffer - Cesium
It also removes rendering artifacts seen at frustum boundaries, which helps when developing new features such as post-processing and lines on ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oops I misunderstood “test 1” to be the first test I posted originally… I just changed #17631 to use the
vIsPerspective == 0.0
comparison.If the depth buffer has minimal precision, I guess rounding a second time could be a problem… Given that, ‘test 1’ would be my preference.
vIsPerspective
can be greater or less than zero due to roundoff.Zero times anything is zero. I think it would be perfectly safe.