Sharp Stencil Shadows - Stylized Pixel-Sharp Shadows for URP
InvertedNormal
$76.23
$108.90
30%OFF
(no ratings)
Jump AssetStore
Sharp Stencil Shadows introduces a new shadowing technique to URP - stencil shadow volumes - that renders crisp, sharp, pixel-perfect shadows at any distance, without absurdly large shadow maps.> Not supported2D RendererXROverlay cameras in a camera stackShadows received on transparent surfacesMetal/iOS (for now)Sharp Stencil Shadows is a URP renderer feature that draws hard, pixel-exact shadows using stencil shadow volumes. Shadow edges stay sharp at every distance and camera angle, with no shadow maps, cascades, or bias to tune. Mesh Renderers and Skinned Mesh Renderers cast shadows automatically, with no components to add.> Key featuresPixel-sharp at any distance. No shadow map resolution or cascades.Component-free casters. Mesh and Skinned Mesh Renderers are found automatically.Directional, point, and spot light support.Two lighting modes. Overlay composites shadows over the image. URP Lighting feeds them into URP's own lighting.Animated and deformed casters. Skinned and compute-deformed meshes cast their current shape.Cutout and glass casters. Alpha-clipped casters cast holes, and transparent casters cast partial, colored shadows.CPU and GPU generation. Burst jobs or batched GPU compute, with automatic per-caster fallback.Every URP rendering path. Forward, Forward+, Deferred, and Deferred+.Desktop and mobile. Windows and Android.Demo scenes included. A compact demo scene and a feature showcase tour.> Stencil shadows vs. shadow mapsShadow maps sample the scene from the light at a fixed resolution, so edges blur, shimmer, or stair-step as the camera moves closer. Stencil shadows are computed from the caster's actual geometry for every screen pixel, so each edge is exactly as sharp as the pixel it lands on, near or far.No resolution budget. No shadow map size, cascade splits, or shadow distance.Stable edges. Shadows don't shimmer when the camera or light moves.This suits projects that want crisp, graphic shadows: stylized, retro, and pixel-art games, top-down and orthographic cameras, mobile games, and scenes viewed up close.> Lighting modesOverlay blends shadowed pixels toward a chosen shadow color and strength after opaques are drawn. It is the cheapest mode, works with any opaque material, and suits mobile and stylized looks. Only for the main directional light.URP Lighting writes stencil shadows into the shadow inputs URP's lit shaders already read. A shadow removes only its own light's direct contribution, so ambient light, sky, reflections, and other lights stay visible in shadowed areas. It works with URP Lit, Simple Lit, Complex Lit, and Shader Graph lit materials.URP Lighting also adds point and spot light shadows:Up to seven shadowed point and spot lights per camera, nearest first.A light layer mask selects which lights cast stencil shadows.Each light processes only the casters inside its range or cone.The lighting mode can be switched at runtime.> Animated and deformed castersSkinned meshes cast their current animated pose, with no setup.GPU-deformed meshes, such as meshes deformed by a compute shader, cast their current shape on the GPU backend.Moving, rotating, scaled, and mirrored casters are supported, including non-uniform scale and physics-driven objects.> Cutout and transparent castersA shadow volume on its own only knows a mesh's shape. For alpha-clipped and transparent materials, three modes are available:Textured. Alpha-clipped shadows follow the material's alpha test, including double-sided foliage cards. Transparent casters filter light per texel by their texture's color and opacity, for stained-glass shadows.Uniform Opacity. Transparent casters cast one partial shadow tinted by their base color, at lower cost.Off. Every caster casts a solid shadow.Materials are classified from their standard URP settings, so existing materials work unchanged. Textured shadows are drawn from a light-space atlas sized to screen density, with Nearest, Bilinear, and Bicubic filtering. Transparent shadows never darken an opaque shadow further, and overlapping glass shadows combine their colors.Colored, partial point and spot light shadows use the included Sharp Stencil Shadows/Lit shader on receivers. Every other feature works with stock URP shaders.> PerformanceRegenerated only on change. A volume is rebuilt only when its caster, pose, or light changes. Static scenes cost little beyond drawing.LOD Group and Auto LOD Support.CPU and GPU backends. Volumes are generated with Burst jobs or in one batched GPU compute dispatch. In Auto mode, each caster the GPU can't handle falls back to the CPU on its own.Scissored stencil work. Each caster's stencil work is limited to its area on screen.Profiling support. Profiler markers and debug statistics report caster counts, backend use, and fallback reasons.Devices without compute shaders use the CPU backend automatically.> SetupNo components. Any Mesh Renderer or Skinned Mesh Renderer on a caster layer with shadow casting enabled casts a stencil shadow.Automatic mesh topology. Mesh edge data is built automatically, and UV and normal seams are welded so meshes read as closed. Topology for non-readable meshes is cached for player builds.Runtime content. Addressables and AssetBundle meshes are covered with an asset label, and procedural meshes with one registration call.Scripting API. Switch lighting mode, backend, and transparent caster mode at runtime, and read debug statistics.Stencil-friendly. Only the low stencil bits you choose are used. Every other bit is preserved for other effects.Fog and post-processing. Shadows fade into Unity's scene fog, and post-processing applies to them normally.> Documentation and supportDocumentation: invertednormal.site/docs/sharpstencilshadowsSupport: invertednormalstudio@gmail.comWebsite: invertednormal.site> CompatibilityUnity: 6.0 through 6.6Render pipeline: URP 17.0 through 17.6, Universal RendererCameras: perspective and orthographic, render textures, MSAA> Rendering pathsForward, Forward+, Deferred, and Deferred+ (Unity 6.1 or later)Graphics APIs and platformsGraphics APIs: DX12, DX11, Vulkan; OpenGL ES 3.2 on AndroidPlatforms: Windows, AndroidMetal (macOS and iOS): not yet tested. Use at your own risk.> Not supported2D RendererXROverlay cameras in a camera stackShadows received on transparent surfacesMetal/iOS (for now)Sharp Stencil Shadows includes code adapted from Unity's Universal Render> Pipeline 17.5.0 under the Unity Companion License; see Third-Party Notices.txt> in the package for details.AI and Agentic coding tools were used to assist in the development of this asset.


