H_CachedShadows for URP (Lighting Performance)
H Assets - H Works Interactive
$16.49
$32.99
50%OFF
(no ratings)
Jump AssetStore
Cache your URP shadow maps once and reuse them every frame. Static lights cost nothing, moving characters still cast live shadows blended on top. Forward, Forward+ and Deferred+.🌑 H_CachedShadows (URP)Stop re-rendering shadows that never change.Cached shadow maps for URP. Render once, reuse every frame.Every frame, URP re-renders every shadow map from scratch. Your lamps didn't move. Your buildings didn't move. Your sun didn't move. URP redraws all of it anyway, forever, and you pay for it in:❌ Shadow casting eating your frame budget on geometry that is identical to last frame❌ Point lights being unaffordable because each one costs 6 shadow renders❌ Turning shadows off on half your lights and lighting the level with fakes❌ Watching your mobile or VR build die the moment you add a third shadowed lampHDRP has had cached shadow maps for years. URP still doesn't. Unity's own roadmap item for it has sat untouched since 2023.H_CachedShadows fixes that.✅ The SolutionThis asset takes over URP's shadow passes and binds a persistent, cached shadow atlas back into URP's shader globals. Your stock Lit shaders keep sampling shadows exactly as they always did. They have no idea the map is cached.A light re-renders only when that light actually changes. Not on a timer. Not when you look away. When it moves, changes range, changes angle, toggles, or you tell it to.Walk around your level all day. Your lamps never re-render.⚡ How Performance Actually ChangesStatic lights, steady state: shadow rendering cost drops to a texture bind.Not "reduced by 40%". The rasterization does not happen. The pass binds a texture that is already in VRAM and gets out of the way.What you still pay for:The composite tiles your movers occupy (small, and it scales with the number of movers, not the number of lights)One extra shadow atlas in memory while Dynamic Caster Composite is onThe sun re-fitting when the camera travels a long way (see Limitations)But these are a fraction costs compared to rendering shadows every frame.🧊 The Cache Is Never Rebuilt.This is the part that makes dynamic shadows nearly free, and it is what nobody else does.The obvious way to get a moving player into a cached shadow map is to re-render that shadow map. Congratulations, you just threw away your cache. That is why "cached shadows" and "characters with shadows" normally means picking one.H_CachedShadows keeps two atlases:🧊 The cache. Your static world. Rendered once. Never touched again.🪞 The composite. A mirror of the cache with your movers blended on top. This is what your shaders sample.Your static shadows are never rebuilt, never re-rasterized, never degraded. They sit frozen in VRAM. The movers are blended into a copy of them.And the blend is not a whole-texture blit. Each frame, only the individual tiles your mover is physically standing in get touched: copy that one tile out of the cache, redraw just the moving objects into it, done. Every other tile in the atlas keeps last frame's pixels for free.200 cached lamps and a walking player = one to three small tiles redrawn per frame.Copying a whole 8192x8192 atlas every frame is around 256 MB of bandwidth. Copying three 512x512 tiles costs nothing worth measuring. That difference is the entire asset.The cost? One extra shadow atlas in memory, at whatever resolution you already picked. That is the entire trade: a bit more VRAM, and your static shadows stay pixel-identical and completely free while your characters cast live, correct, moving shadows on top of them.The sun works the same way, per cascade. The cascade your player stands in gets a live overlay. The distant ones stay frozen.🎯 FeaturesPoint, spot and directional lightsForward, Forward+ and Deferred+Automatic per-light invalidation. No timers to tune, no manual refresh calls. Move a lamp, its shadow updates. Nothing else re-renders.Camera-independent point/spot caching. Your lamps do not care where the player is looking.Live dynamic shadows blended on top of the cache, per tile, per cascadeStable atlas tiles. Every light keeps a permanent slot, so its pixels survive across frames.Same lights URP would shadow. The keep-set uses URP's own priority order, so toggling the asset on and off does not change which lights have shadows.Amortised refreshes. Big updates spread across frames instead of spiking. Tunable budget.Update policies: CacheOnceHold (default), Periodic, Manual, EveryFrame (for A/B testing against stock URP)Optional shared settings asset to drive several renderers from one sourceRenderGraph native. Unity 6 / URP 17+.Full source. No DLLs.🛠️ Easy Setup✔ Add the Render Feature to your Universal Renderer✔ Put the Dynamic Shadow Caster component on anything that moves (root object, children are automatic)✔ Ship it⚠️ Limitations ⚠️-Classic Deferred cannot cache point and spot shadowsURP resolves point/spot shadows inside its own shadow pass using an internal light index that only exists while that pass runs. This asset replaces that pass, so there is nothing for the cached atlas to hook into. This is a URP architecture limit, not a bug.The asset detects it and handles it gracefully: in classic Deferred it hands point/spot back to URP so they render normally and uncached, and the toggle is locked off in the inspector with an explanation. The sun still caches.Use Deferred+ instead. It is the same deferred shading with a clustered light loop, it is one dropdown away, and it caches everything.-The sun re-fits when the camera moves farURP builds directional cascades around the camera, so a cached cascade is only valid while the camera stays near where it was cached. It re-fits when the camera travels roughly a tenth of your shadow distance or turns more than a few degrees, and holds the rest of the time.This is how cascades work, not a choice this asset makes. HDRP's own docs say the same thing about their cached shadows. Point and spot lights have no such limit and are genuinely camera-independent.-Everything that moves needs the componentThe static/dynamic split is driven by Renderer.staticShadowCaster, which this asset owns. Anything without a Dynamic Shadow Caster counts as static, and if it moves, its shadow freezes where it was first cached. Animated meshes without one are called out with a warning naming the objects, so you will not ship it by accident.Corollary: do not use Renderer.staticShadowCaster for your own purposes while this asset is enabled.-URP's 256 light cap still appliesA point light costs 6 atlas slices, a spot costs 1. So roughly 42 point lights or 256 spot lights can be shadowed at once. That is URP's ceiling, not this asset's. If your lamps only shine downward, spot lights get you six times the coverage for the same budget.Other notesDynamic Caster Composite is play mode only, and costs a second shadow atlas in memoryComposite mode needs additional light shadows enabled on your URP assetWorks with URP's standard shadows. Third-party shadow-sampling shaders that bypass URP's globals are out of scope.Unity 6+ / URP 17+ with RenderGraph.🧨 Battle Tested in ProductionBuilt for our own game, not as a tech demo.Silent Strike is our in-development tactical shooter, and it is the reason this asset exists. Heavily lit interiors, a lamp on every pillar, a shadow budget that stock URP simply could not pay. See it running in the video above.This asset was not written to be sold. It was written because we needed it, and then hardened against a real scene with real content:Stress tested against 150+ shadow-casting lights at onceDebugged against real player builds, not just the editor, where the interesting bugs actually liveHammered on Deferred+, Forward+, and Forward until each behaved identicallyTuned until the per-frame cost stayed inside a 1ms budgetEvery limitation listed below was found the hard way, in a real scene, and is documented instead of hidden. This is shipping code from a game in active development, with the rough edges already filed off.📍 See for yourselfDownload demo here.💬 SupportNeed help or have questions?📩 Email: assetsupport@hworksinteractive.com💬 Discord (fast & friendly support): https://discord.gg/4UB6x2bVge





