Distant Shadows URP
개요
Demo THE PROBLEM URP only draws shadows close to the camera. The default is 50 m, and most outdoor games stop at around 150 m. Past that, hills, trees and buildings have no shadows, so the world looks flat. You can raise the distance, but URP redraws every shadow every frame. Stretch that over kilometres and shadows often turn blurry, flicker and cost much more to draw. THE SOLUTION Distant Shadows adds a second set of sun shadows for everything far away, out to 150 km. URP keeps drawing the shadows near the camera exactly as before, and Distant Shadows takes over where they fade out. It stays fast because distant shadows are saved and reused instead of redrawn every frame. They only refresh when the sun or camera has moved enough to matter, and each refresh is spread over several frames so you never get a stutter. Trees cast leaf-shaped shadows, not solid blobs, and distant shadows match the look of URP's own. THE RESULT - Benchmarked 150 km of shadows with a day and night cycle cost my PC only 0.06 ms. Pushing URP's own shadows to just 2 km cost me 0.78 ms, which makes Distant Shadows 13 times cheaper with 75 times the reach! EASY SETUP: Create an empty GameObject and add the "Distant Shadows Manager" component. Copy the Distant Shadows Subgraph to your Shaders and hook it in. DONE!!!
Performance About 0.1 ms of GPU time on my own PC, with and 48 MB of memory on the High setting. Check the demo and test on your own PC! COMPATIBILITY Supports 2022.3 all the way to 6.6 Includes modified copies of the URP/Lit and URP/Terrain Lit shaders, so they receive distant shadows without any graph work. Currently tested on Windows only. Other platforms are planned for the next update. Tested with H-Cached Shadows and compatible. In theory it works with any plugin that changes how URP’s near shadows are drawn, because Distant Shadows doesn’t touch them.
GOOD TO KNOW Sun shadows only (the main Directional Light). Point lights and spot lights are not affected. Distant shadows are not fully dynamic. Each refresh is spread over 16 frames, so it suits a slowly moving sun and static objects spawned at runtime. It is not meant for distant shadows from vehicles or other fast-moving objects.
Key features Cached sun shadows from 1 km up to 150 km (8 km by default) 4 cached shadow levels around the camera, taking over where URP’s own shadows end Works with a moving sun (time of day). Redraws are spread over 16 frames to avoid hitches Terrain, trees and meshes all cast distant shadows Alpha cutout support, so leaves and foliage cast correctly shaped shadows Live Caster component for objects that are spawned, moved or changed at runtime Exclude list and size filters to control which objects cast 4 quality presets: Low (3 MB), Medium (12 MB), High (48 MB), Ultra (192 MB) About 0.1 ms GPU on an RTX 3090 at 1440p (High) Shader Graph Sub Graph to add distant shadows to your own shaders Includes Distant Shadows versions of URP Lit and URP Terrain Lit Full C# and shader source code, with documentation Demo scene with a built-in benchmark
Requirements Unity 6 (6000.0 or newer) Universal Render Pipeline 17 A Directional Light used as the sun
Supported platforms Windows (Direct3D 11) tested. Other platforms are untested and planned for a later update
Limitations Sun shadows only. Point lights and spot lights are not affected Skinned meshes, wind animation and terrain holes are not included in distant shadows Not intended for fast-moving objects in the distance Materials need the included shaders or the Sub Graph to receive distant shadows
Requires Input package for demo levels
Ratings and reviews
You can rate and review this item after purchase.
No buyer reviews yet.