Sharp Shadows Toolkit

The Sharp Shadows Toolkit is a code package that brings sharp, pixel-perfect shadows to your Universal Render Pipeline (URP) project. Many games and experiences target a non-photo-realistic art style for which sharp shadows are better suited than the built-in shadows that tend to be either too soft or too jagged, especially on low quality settings.

The toolkit can be useful in a wide variety of scenarios, from old-school drop shadows for characters in a mobile game to ubiquitous high quality shadows for an architecture visualization project.

Features

  • Dynamic pixel-perfect shadows for the Lightweight/Universal Render Pipeline
  • No jagged shadow edges or visible pixels
  • Seamless editor integration using automatic asset post processing
  • Custom shadow direction for e.g. drop shadows
  • Two rendering modes
    • Inject Into Screen Space Shadow Resolve Texture: Inject into screen space shadow texture for optimal image quality
    • Multiply Scene After Opaque: Draw after opaque geometry for optimal performance
  • Handles both skinned and non-skinned meshes
  • No restriction on the mesh geometry of the shadow caster
  • Multi-object editing
  • Fog support

Current Limitations

  • For the Lightweight/Universal Render Pipeline only
  • Only supports the main directional light of the scene
  • No support for custom vertex displacement
  • Alpha blended or clipped geometry will produce solid shadows (the shape of the triangles)
  • Skinned mesh shadows may appear cracked if they are subject to large deformations
  • Shadows are not anti-aliased when injected into screen space shadow texture

Supported Unity builds

Unity version Build tested LWRP/URP version
Unity 2019.1 2019.1.10f1 5.7.2
Unity 2019.2 2019.2.3f1 6.9.1
Unity 2019.3 2019.3.0b2, 2019.3.5f1 7.0.1, 7.1.8
Unity 2021.1 2021.1.11f1 11.0.0
Unity 2021.2 2021.2.6f1, 2021.2.19f1 12.1.2, 12.1.6
Unity 2021.3 2021.3.22f1 12.1.10

Note Due to the large number of possible Unity/URP version combinations, only the above combinations are officially supported.