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: #31528
Description
For mobile and performance restricted use cases it would be nice to have a more simple and fast blur.
The presented box blur approach is in some sense the simplest thing you can do to produce a blur. It use just a single pass and can produce a usable blur with just 25 taps. Since there is a separate parameter called
separation
, you can control the spread of the blur without changing the number of samples. As you can see below the result is more blocky but less taxing than Gaussian.For comparison:
https://rawcdn.githack.com/Mugen87/three.js/62a091255ebcb80e63f14f1f581e8e66df199c2d/examples/webgpu_postprocessing_dof_basic.html
https://threejs.org/examples/webgpu_postprocessing_dof_basic