Author here, Thank you very much for linking! Masaki Kawase is a bit of a graphics programming idol of mine. Living in Japan, I got to interview him on a zoom call about what it was like being a graphics programmer in those adventurous times 1999~2005 of the Japanese video game scene.
This kick-started by desire to write about the Dual-Kawase Blur, a technique I stumbled upon when ricing my linux distro.
Has anyone got suggestions for blur algorithms suitable for compute shaders? The usual Kawase blur (described in the article) uses bilinear sampling of textures.
You can, of course, implement the algorithm as is on a compute shader with texture sampling.
But I have a situation where the inputs and outputs should be in shared memory. I'm trying to avoid writing the results out to off-chip DRAM, which would be necessary to be able to use texture sampling.
I spent some time looking into a way of doing an efficient compute shader blur using warp/wave/subgroup intrinsics to downsample the image and then do some kind of gaussian-esque weighted average. The hard part here is that the Kawase blur samples the input at "odd" locations but warp intrinsics are limited to "even" locations if that makes sense.
I would appreciate if anyone knows any prior art in this department.
I didn't really understand why every image is slowly moving around. It says:
> Above the box you have an Animate button, which will move the scene around to tease out problems of upcoming algorithms. Movement happens before our blur will be applied, akin to the player character moving.
I don't really understand the explanation - the movement just seemed a bit annoying.
Once Multi-Step Downsampling comes into the mix, the image starts to "boil" as it moves. This is especially bad with very strong lights that are small, as the lights seem to appear and disappear with long downsample chains. Most of the recent blur technique evolution centered on fixing this issue, as shown in "Next Generation Post Processing in Call of Duty: Advanced Warfare" at the end of the article.
This is not the first time [1] I hear this critique of movement by default being annoying. Should I just turn it off by default?
Do you know what aliasing is in a game? When the edges are too sharp? They can look okay in a still image, but they are really noticeable when things are in motion. Another such example is the moire effect. Moire is very noticeable in still images too, but when moving, it's really noticeable.
These blur effects, like any other graphical thing, can have a similar effect when combined with motion. The animate function is to bring these issues out, if there is any.
Spherical Harmonic Lighting is an alternative or used to supplement the generation of HDR cube maps for the purpose of global illumination. For the very diffuse aspect of this global illumination, Spherical Harmonics are used (Often called light probes), as a very cheap approximation of the environment, that is easy to get in and out of shaders and interpolate between them. They are just a bunch of RGB floats, so you can place a ton of them in the environment to capture a scene's direct or indirect lighting. For specular reflections you still have to use HDR cube maps, as the light probes don't hold enough information for that task.
Blurs are a basic building block of image processing and used in a ton of effects. In a way, there are related topics, as the cube maps generated to cover different roughness factors for PBR rendering are, in-fact blurs! https://threejs.org/docs/#api/en/extras/PMREMGenerator But that's not the topic of the article, but instead of how to do blurs efficiently in real time, in the first place.
Justified, in general, looks neater, is more formal, but is a bit more harder to read as well. I personally have no issue with it either way, but to tell you the truth, from a quick check I could not find any website that uses justified text, not even the ones that I think are formal and professional. Reuters, APNews, Wikipedia, Wordpress, Medium, everything I checked is unjustified. So I think it's a conventional default, if nothing else.
Author here, Thank you very much for linking! Masaki Kawase is a bit of a graphics programming idol of mine. Living in Japan, I got to interview him on a zoom call about what it was like being a graphics programmer in those adventurous times 1999~2005 of the Japanese video game scene.
This kick-started by desire to write about the Dual-Kawase Blur, a technique I stumbled upon when ricing my linux distro.
Has anyone got suggestions for blur algorithms suitable for compute shaders? The usual Kawase blur (described in the article) uses bilinear sampling of textures.
You can, of course, implement the algorithm as is on a compute shader with texture sampling.
But I have a situation where the inputs and outputs should be in shared memory. I'm trying to avoid writing the results out to off-chip DRAM, which would be necessary to be able to use texture sampling.
I spent some time looking into a way of doing an efficient compute shader blur using warp/wave/subgroup intrinsics to downsample the image and then do some kind of gaussian-esque weighted average. The hard part here is that the Kawase blur samples the input at "odd" locations but warp intrinsics are limited to "even" locations if that makes sense.
I would appreciate if anyone knows any prior art in this department.
Pretty amazing writeup.
I didn't really understand why every image is slowly moving around. It says:
> Above the box you have an Animate button, which will move the scene around to tease out problems of upcoming algorithms. Movement happens before our blur will be applied, akin to the player character moving.
I don't really understand the explanation - the movement just seemed a bit annoying.
Once Multi-Step Downsampling comes into the mix, the image starts to "boil" as it moves. This is especially bad with very strong lights that are small, as the lights seem to appear and disappear with long downsample chains. Most of the recent blur technique evolution centered on fixing this issue, as shown in "Next Generation Post Processing in Call of Duty: Advanced Warfare" at the end of the article.
This is not the first time [1] I hear this critique of movement by default being annoying. Should I just turn it off by default?
[1] https://news.ycombinator.com/item?id=42191709
Do you know what aliasing is in a game? When the edges are too sharp? They can look okay in a still image, but they are really noticeable when things are in motion. Another such example is the moire effect. Moire is very noticeable in still images too, but when moving, it's really noticeable.
These blur effects, like any other graphical thing, can have a similar effect when combined with motion. The animate function is to bring these issues out, if there is any.
Thank you so much! Love the interactive examples.
A great video on a similar subject: https://m.youtube.com/watch?v=v9x_50czf-4
Acerola does some fun projects, but his optimized grass rant was the funniest thing I saw in years. =3
How does this compare to Spherical Harmonic Lighting?
These are unrelated techniques.
Spherical Harmonic Lighting is an alternative or used to supplement the generation of HDR cube maps for the purpose of global illumination. For the very diffuse aspect of this global illumination, Spherical Harmonics are used (Often called light probes), as a very cheap approximation of the environment, that is easy to get in and out of shaders and interpolate between them. They are just a bunch of RGB floats, so you can place a ton of them in the environment to capture a scene's direct or indirect lighting. For specular reflections you still have to use HDR cube maps, as the light probes don't hold enough information for that task.
Blurs are a basic building block of image processing and used in a ton of effects. In a way, there are related topics, as the cube maps generated to cover different roughness factors for PBR rendering are, in-fact blurs! https://threejs.org/docs/#api/en/extras/PMREMGenerator But that's not the topic of the article, but instead of how to do blurs efficiently in real time, in the first place.
This is a really well written blog, great work!
I like the progressive example toys. Thanks!
I really like the content but the text blocks being justified makes it more difficult to read than it needs to be.
First time hearing this! I added a URL parameter `noJustify`, which removes text-justification. Eg. https://blog.frost.kiwi/dual-kawase/?noJustify
I'm not sure either way, would you say this makes it easier to read and I should make it the default?
Justified, in general, looks neater, is more formal, but is a bit more harder to read as well. I personally have no issue with it either way, but to tell you the truth, from a quick check I could not find any website that uses justified text, not even the ones that I think are formal and professional. Reuters, APNews, Wikipedia, Wordpress, Medium, everything I checked is unjustified. So I think it's a conventional default, if nothing else.