Skip to content

Conversation

@toji
Copy link

@toji toji commented Nov 7, 2025

Based on a request from kbr@ in https://issues.chromium.org/u/1/issues/445223447

This change ports the WebGPU Blur renderer to use Render passes instead of compute passes. The shaders were ported as directly as possible from the WebGL version of the shaders, not the WebGPU version that was previously in the file. This is for the purposes of providing a more direct power usage comparison between the WebGPU and WebGL versions (which I have not done).

The main benefits of using the fragment shaders here are that they make some of the texture sampling simpler, "workgroup" sizes will be handled by the implementation automatically and optimally. It also doesn't require STORAGE usage, and thus any concerns about being able to use bgra8 as a storage texture are no longer a problem. This likely removes the need for the "Zero-copy output" toggle, since you are guaranteed that it can always be zero copy. Nevertheless I've still included support for both modes in case it was providing something else I wasn't aware of.

@axinging
Copy link
Contributor

I think we should keep both graphics and compute path, so that we can have a better understanding and comparision between the two?

@toji toji closed this Nov 13, 2025
@toji
Copy link
Author

toji commented Nov 13, 2025

webatintel/videoeffect#7 handles both use shader types, and seems to be the right repo for it.

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