Here's a rain shader that uses a blurred screen texture (done via a command buffer) to create a bloomed light refracting through the drops. As its base, it's using the blurry refraction example from here ( https://docs.unity3d.com/Manual/GraphicsCommandBuffers.html ).
The particle system has CommandBufferBlurRefractionHDR.cs (a version of the script in the command buffer example, tweaked to allow an HDR render texture) on it, which adds the command buffer to the main camera (capturing the screen, blurring it, then setting it as a global render texture called "_GrabBlurTexture".
The script lets you change the blur scale and also the render texture format (if you're not using bloom or tone mapping, you could bump this down to the default ARGB32). The rest of the settings are on the shader of the rain particles.
It's very much a first pass at this effect - I haven't done any performance testing yet, and I intend to continue to tweak and improve it.
It also requires the project to be in Linear colour space, not Gamma, but honestly that's something you should be in anyway! Edit -> Project Settings -> Player -> Other Settings -> Rendering, Color Space. So if things look wrong when you import it, check your colour space first. This isn't a requirement of the effect, just the way the command buffer blur is working, I'm sure I can fix the visual issues that spring up if you're using Gamma... but again, why? Linear is best ;)
I feel like I can get a pretty decent approximation of this effect without using a blurry screen grab at all, which I'm guessing will be a bit more performant, but until I do some comparison testing I can't be sure. I'll upload that version soon as well.
Here's a gif of the version just using Light Attenuation and a vanilla screengrab (and also less particles).

If you have any feedback on how well this works (or doesn't work) for you, please let me know - Command Buffers are still fairly new to me.
Puck Loves Games
2020-11-11 05:41:05 +0000 UTC