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

Logarithmic depthbuffer not working correctly on devices that do not support EXT_frag_depth #13047

Closed
4 of 13 tasks
Avocher opened this issue Jan 5, 2018 · 4 comments
Closed
4 of 13 tasks

Comments

@Avocher
Copy link
Contributor

Avocher commented Jan 5, 2018

Description of the problem

Surfaces "bend" and disappear after the latest update to support logarithmic depthbuffer on devices that do not support EXT_frag_depth with logarithmicDepthBuffer set to true.

https://jsfiddle.net/dz37428b/7/

Three.js version
  • Dev
  • r89
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
@WestLangley
Copy link
Collaborator

Surfaces "bend" and disappear

Can you provide a screenshot?

after the latest update to support logarithmic depthbuffer

What "update" are your referring to? Did it work prior to that update?

Chrome

Chrome only?

@Avocher
Copy link
Contributor Author

Avocher commented Jan 8, 2018

Here's a screenshot from the fiddle screenshot

I'm guessing it indirectly happened after this pull request #11995

I only had chrome/safari on my test devices so i checked those, I can install firefox if you want.

I should probable add that, the closer the camera is to the surface the greater the bending is.

@WestLangley
Copy link
Collaborator

OK, there is no "bending". What you are seeing are depth-buffer artifacts close to the near plane.

The issue is discussed here, and the work-around is to tessellate your geometry -- both boxes in this case.

As stated in the title to this post, the logarithmic depth buffer artifacts occur on devices that do not support the EXT_frag_depth extension, and for which we are handling the logarithmic depth buffer in software.

Fiddle showing the issue:
https://jsfiddle.net/ynom3pgu/ ( or for mobile viewing, https://jsfiddle.net/ynom3pgu/show )

three.js r.90dev

@Avocher
Copy link
Contributor Author

Avocher commented Jan 9, 2018

I see,
Sadly tessellation is not an option for me as I have little to no control over the assets, so I'll just fall back to linear depth buffer when needed.

Thank you so much @WestLangley for helping me out.

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