URP-Transparent-Distortion-Example icon indicating copy to clipboard operation
URP-Transparent-Distortion-Example copied to clipboard

Example Unity URP project, demonstrating distortion(heatwave) effect on opaque and transparent objects

Distortion effect for Unity URP (supports transparent objects)

image

Usage

  • Clone repository and open in Unity (2020 or later, but may work with 2019)
  • Make sure you have a separate layer created for objects that should display distortion (you can name it "Distortion")
  • DO NOT forget to apply that layer to every object or particle effect that uses distortion material
  • Check URP render data asset and setup your project corretly (reference below if you dont want to open project) image
  • I recommend copying settings as shown, otherwise effect might not work
  • Apply material and layer to object that should display the distortion effect
  • Effect should now be working!

Additional Notes:

  • Sample shader is included, or you can build your own shader graph or shader code ones based on it
  • Effect uses global texture as instead of SceneColor node, so you can access it in any ways you desire

Credits

Shader effect is based on GabrielAguiar's - https://www.youtube.com/watch?v=CXCyVDEplyM