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

DepthOfField effect not focusing with logarithmDepthBuffer #445

Closed
seo-rii opened this issue Jan 29, 2023 · 2 comments
Closed

DepthOfField effect not focusing with logarithmDepthBuffer #445

seo-rii opened this issue Jan 29, 2023 · 2 comments
Labels
feature request New feature request

Comments

@seo-rii
Copy link

seo-rii commented Jan 29, 2023

Description of the bug

DepthOfField effect is not focusing object when I turned logarithmDepthBuffer option to true.

To Reproduce

This is a link of example of react-three-fiber using DepthOfField effect.
https://codesandbox.io/s/bst0cy

And this is a link that only changed option logarithmDepthBuffer to true. Everything looks blurry.
https://codesandbox.io/s/monitors-forked-pl44hr?file=/src/App.js

Expected behavior

Blur effect should focus target object.

Screenshots

Without logarithmDepthBuffer
image

With logarithmDepthBuffer
image

Library versions used

  • Three: 0.148.0
  • Post Processing: 6.29.3

Desktop

  • OS: Windows
  • Browser: Chrome latest (stable)
  • Graphics hardware: NVIDIA
@seo-rii seo-rii changed the title DepthOfField effect works strange with logarithmDepthBuffer DepthOfField effect not focusing with logarithmDepthBuffer Jan 29, 2023
@vanruesc
Copy link
Member

vanruesc commented Feb 6, 2023

logarithmicDepthBuffer is currently not supported and I'm not sure how difficult it would be to add support. Simply converting a log depth texture to linear depth defeats the purpose of encoding it in the first place, so depth values would probably need to be decoded on the fly inside the shaders on each read.

Let's keep this open as a feature request.

@vanruesc vanruesc added the feature request New feature request label Feb 6, 2023
@vanruesc
Copy link
Member

I've added this feature to the roadmap (#279).

@vanruesc vanruesc mentioned this issue Mar 26, 2023
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants