Modern 2D LightRays
Workflow Tutorials
Practical recipes for windows, pixel art, dust, collider-driven beams and day/night scenes.
Unity 2021.3 → 6.7+URP 2DPixel ArtLight2D
Warm window beam
Create a ray and place its top edge at the window opening.
Apply Warm Window in Quick Looks.
Use the Sunbeam shape preset, then fine-tune the four handles.
Use Screen or Linear Dodge for a brighter result.
Optional: enable Matching Light2D and Dust Motes.
Pixel-art god rays
Apply Pixel Rays.
Set Pixel Resolution to match the visual scale of your scene.
Use 4–8 Opacity Levels for visible stepping.
Keep Ordered Dither enabled for smoother gradients without sub-pixel shimmer.
Set Animation FPS near your game's visual animation cadence.
Ray from a window or mask sprite
Set Emitter Shape → Mode to Sprite.
Assign the SpriteRenderer that represents the opening.
Leave Auto Refresh on if the source transforms or changes sprite.
Use falloff controls to soften the outer edges.
Collider-driven beam
Choose Collider and assign a PolygonCollider2D or BoxCollider2D. PolygonCollider2D uses path 0. This is useful when the light opening already exists as gameplay collision geometry.
Dusty interior
Enable Particles and choose Dust Motes.
Start around Density 0.7–1.2, Size 0.2–0.4 and Lifetime 5–8.
Keep Speed low and Movement Variation modest for floating dust.
Use a warm, slightly transparent particle color for sunlit rooms.
Dark or inverted rays
Use Multiply, Darken, Burn, Difference or Negation. These are useful for supernatural areas, underwater shadows, magical inversions or stylized darkness.
Day/night control
Create one Light Rays Global Controller.
Animate Global Intensity and Global Tint from your day/night system.
Use hierarchy Light Rays Groups when one room or area needs a local multiplier.