Skip to content

TSL: Add boxBlur(). #31556

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

Merged
merged 3 commits into from
Aug 2, 2025
Merged

TSL: Add boxBlur(). #31556

merged 3 commits into from
Aug 2, 2025

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 2, 2025

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

@sunag sunag added this to the r180 milestone Aug 2, 2025
@sunag sunag merged commit ff9b259 into mrdoob:dev Aug 2, 2025
12 of 13 checks passed
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

Successfully merging this pull request may close these issues.

2 participants