Skip to content

Cascaded shadow maps (CSM) #1

Description

@proggeramlug

Priority: High | Effort: Medium

Replace the single 4K shadow map with 3-4 cascades covering near/mid/far ranges.

Current state

  • Single 4096x4096 shadow map, ±30 world unit frustum
  • Camera-following with texel snap, 16-tap Poisson PCF
  • Dynamic-offset uniform buffer for per-node transforms

What's needed

  • Split camera frustum into N slices (0-10, 10-30, 30-100 units)
  • One shadow pass per cascade with tighter ortho fit
  • Scene shader samples correct cascade based on fragment depth
  • Smooth blend between cascades

Key files

  • native/shared/src/shadows.rs
  • native/shared/src/renderer.rs (shadow pass + sample_shadow WGSL)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions