Skip to content

Refraction shader graph for Unity's URP (Universal Render Pipeline). Based on HDRP's Screen Space Refraction.

License

Notifications You must be signed in to change notification settings

jiaozi158/UnityRefractionURP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Refraction shader graph for Unity's URP (Universal Render Pipeline). Based on HDRP's Screen Space Refraction.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages