Rewrote the WebGPU bloom pass based on the classic Unreal solution of blurring and combining the levels of an image pyramid. Fixed the regl bloom pass to use the downscaled blurred mipmap levels to build the first pyramid.

This commit is contained in:
Rezmason
2021-11-14 22:01:56 -08:00
parent f907c1c91b
commit b0a4acdfdb
8 changed files with 170 additions and 78 deletions

View File

@@ -1,18 +1,13 @@
TODO:
WebGPU
Figure out texture pyramid stuff
Idea: use mip levels to store stuff
Multiple draw calls, if level N must downsample level N - 1
Does every level HAVE to be downsampled from the previous level? Or can they all be downsampled from a single source?
What about in my case in particular? I'm blurring everything anyway.
blur pass
Switch to rgba32float somehow?
Why isn't this straightforward?
Rename setSize to rebuild — it is the function that receives inputs as well as screen size
Create and store the bloom bind groups on resize
Make sure everything is properly commented
Update links in issues
Get rid of end pass once it's possible to copy a bgra8unorm to a canvas texture
Switch to rgba32float somehow?
Why isn't this straightforward?
Support looping