URP Distortion Shader with Support for Transparent Objects

Hello everyone,
I made a short video tutorial with a simple explanation how to get a distortion shader for URP with support for transparent objects up-and-running.
The good thing about this approach is: the workflow for the distortion shader supports ShaderGraph!

Installation summary:

  • import the URP Grab Pass package
  • import the URP Distortion Shader package
  • add the Grab Pass Renderer Feature to your URP Renderer
  • use the Distortion material on an object or apply the HoaxGames/DistortionShader to your own objects material
  • alternatively check out the included example scene

I hope some of you guys find this useful :).

3 Likes

How’s performance?

Performance is great I guess (with the simple “Stats” view it’s less than 0.1ms on the GPU).
The Grab Pass Renderer Feature from the Git-Repo requires 1 pass call only therefore it should be super performant.
The distortion shader is also build using a fairly simple ShaderGraph and should make zero problems in regard to performance either :).

1 Like

How can I do this with built in RP?

The provided solution sadly won’t work for Build-in RP.
You will have to search for some older tutorials on the net to find a solution for BIRP.

You can also try to check out this:
https://assetstore.unity.com/packages/vfx/particles/particle-pack-127325#description

and this:
https://assetstore.unity.com/packages/vfx/particles/legacy-particle-pack-73777#releases

If you are lucky, it contains a distortion shader for BIRP :).

1 Like

Does this only work in the version it was made in? I am trying to use it in a more recent version because of performance issues on my computer. The version I am currently in is 2022.3.19f1.

  • 5xdf

Things may have changed since the initial implementation - on my side and on the Github plugin side.