Skip to content

Blur SRP

A blur Scriptable Render Pass in Unity 6, and what I learnt failing at SDF clouds and Kuwahara.

Cube scene without blurSame cube scene with the blur post-process

details

The result of this project is a Blur Scriptable Render Pass & post-process in Unity 6. But it’s really a learning experience, since this is not what I set out to create. Here’s the result first:

process

SDF clouds. I first wanted raymarched signed distance field clouds, inspired by Maxime Heckel’s post. ShaderGraph didn’t work out, so I switched to HLSL. About halfway through, the lighting of my clouds was off and, still new to HLSL, I couldn’t find out why. So I scrapped them.

Oil painting post-process. Next I wanted an oil painting effect inspired by this talk, which turned out way too high end, so I went for an anisotropic Kuwahara filter based on Acerola’s video. Instead of OnRenderImage I wanted to use a Scriptable Render Feature. To learn render passes I started with a simple blur post-process (yep, that’s the one above).

The Kuwahara filter failed: the anisotropic version needs an eigenvector texture that is used later in the shader, and I didn’t manage to generate it. Many render pass tutorials are outdated, my code got messy and ChatGPT kept hallucinating. The likely fix is splitting it into two passes and passing the texture between them, but I won’t try that now.

summary

I dreamt a bit too big and tried too hard too soon. But I learnt a lot about HLSL, Scriptable Render Passes, raymarching and blitting.

Who doesn’t like some nice walls to run into in order to learn things? I sure love those walls and the David-sized dents I put into them :)