Smart Fog 2D is an asset that lets you create areas of fog that can be cleared through special fog lights. Great for topdown and side-scroller games!This package features two versions of the same fog shader - one for URP and one for Built-in Render Pipeline. When you import the package after compiling scripts, you'll be asked to select which render pipeline you're using.The shader not associated with your selected RP will be discarded. The same goes for demo scenes targeted to the diffrernt render pipelines.Smart Fog 2D adds dynamic, clearable fog to 2D games. Fog Lights cut through the fog per-pixel based on distance, cone angle, and range, so players can carve visibility out of dark or obscured areas in real time.Works for top-down games (torchlight cutting through a dungeon), side-scrollers (headlights revealing a path), or any 2D game where controlled visibility matters. Supports both circular (point) and cone (directional) light shapes, with per-light falloff, range, and resistance settings so you can tune how easily different areas of fog clear.Fog layers and lights are highly configurable and every setting can be tweaked live in Play Mode for fast experimentation. Light culling keeps performance in check by excluding lights outside camera range from GPU upload.Supports both Built-In and Universal Render Pipeline (URP), with sample scenes for each. Documentation for setup and explaining each component is included.2D fog shader with scrolling, animated fog texturesPer-pixel fog clearing driven by Fog Lights - distance, cone angle, and range based, no mesh deformationCircle (point) and Cone (directional) light shapes, each with independent falloff, range, and clearance resistance settingsEdge feathering against scene geometry via camera depth textureMultiple fog layers per scene, each with independent density, color, and light influence settingsLight culling - lights outside a configurable radius from the camera are excluded from the shaderConfigurable Max Light Count and Light Update Interval for performance tuningLive-editable fog and light settings in Play Mode for quick experimentationSupports both perspective and orthographic camerasCompatible with Unity 2019.4+ (Unity 6 recommended), Built-In and URP (10+) render pipelinesSample scenes included for both render pipelinesAi was used in:- Planning of the project (including how to structure project for packaging).- Built-in render pipeline compatibility with the fog shader.- Backwards compatibility of the solution with Unity versions 2019+- Commenting and documentation of code (each instance verified for accuracy).- Some more complicated and mathmatical aspects of the fog shader.- Code snippets here and there (mainly with the FogManager and shader).




