Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 2.03 KB

README.md

File metadata and controls

47 lines (34 loc) · 2.03 KB

UnityRefractionURP

Refraction shader for Unity's URP (Universal Render Pipeline).

Based on HDRP's ScreenSpaceRefraction.

This shader is created in Shader Graph, so you can easily modify it to add more features. (ex. NormalMap)

Please read the Documentation and Requirements before using this repository.

Screenshots

(Sample)

Sample

RefractionInScene

Dithered Transparent Shadows are available in URP 14 (Unity 2022.2) and above. (with high PCF shadow sampling)

DitheredTransparentShadow

Documentation

Please refer to this.

Requirements

  • URP 12.1 and above. (URP 14 if using Dithered Transparent Shadow)
  • Depth Texture Enabled in current URP Asset.
  • Opaque Texture Enabled in current URP Asset.
  • Set Material Type to Transparent.
  • Enable Alpha Clipping in material if using Dithered Transparent Shadow.
  • Perspective Camera (Orthographic Projection is not supported)

Limitation

  • Will not handle recursive refraction.
  • Other transparent objects will not appear in refraction.
  • Does not support rough refraction. (Color Pyramid Custom Renderer Feature needed)
  • Does not support transparent shadow. (Dithered Transparent Shadow in Shader Graph?) (Done)
  • Will not support transparent colored shadow.

License

MIT MIT License