question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Logarithmic Depth Artifacts

See original GitHub issue

Description 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

logdepthbuf

I get the same artifacts in one of my projects where I use logarithmic depth for testing purposes:

r108 (worked fine) r109 (broken)
logdepthbuf1 logdepthbuf2

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:closed
  • Created 4 years ago
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gkjohnsoncommented, Oct 3, 2019

Oops I misunderstood “test 1” to be the first test I posted originally… I just changed #17631 to use the vIsPerspective == 0.0 comparison.

1reaction
WestLangleycommented, Oct 1, 2019

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 < 1.0

vIsPerspective can be greater or less than zero due to roundoff.

vIsPerspective == 0.0 doesn’t seem safe enough.

Zero times anything is zero. I think it would be perfectly safe.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found