Examples: Add webgpu_postprocessing_dof_basic.
#31445
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: -
Description
Physically correct DoF shaders are quite heavy so it would be nice to have something more lightweight. The idea of the PR is to decouple the out-of-focus blur from the DoF so developers can use blur effects of different quality and speed level. In this way, you can use hash, box or gaussian blur or whatever technique that suits best to the application. The DoF effect itself is so simple that isn't not worth to put in in a separate module. It's just inlined.
My goal is to enhance the existing
DepthOfFieldNodeby making input parameters more physically correct and also provide a higher quality DoF (the above blurs are no physically correct replacement for an optical lens blur). Developers can then choose between something physically correct/high-quality and a more cheap/simple solution.