8000
Skip to content

[Feature]: Implement cascaded shadow maps for Sun lighting #1014

Description

@Zemledelec

Problem statement

OpenGlobus currently needs a more robust shadow rendering solution for Sun/light-based global scenes.

A single shadow map is not enough for large-scale terrain and planet rendering, because it either loses precision near the camera or does not cover enough distance. This becomes especially visible in scenes with terrain, buildings, projected objects, and large view distances.

We need a scalable shadow mapping system that can work well with the existing rendering pipeline and support high-quality shadows for Sun lighting.

Proposed solution

Implement Cascaded Shadow Maps (CSM) for Sun lighting.

The implementation should use CameraDepthHandler as the main API for managing shadow/depth cameras. Each cascade can be represented as a projection camera handled by CameraDepthHandler.

The number of projection cameras/cascades should not be hardcoded. It should be limited only by available GPU/resources and configured by the user or renderer settings.

Expected behavior:

  • Support multiple projection cameras for Sun shadow cascades.
  • Use CameraDepthHandler as the shared API for depth rendering.< 8338 /li>
  • Use a deferred lighting technique for applying shadows in the G-buffer/deferred pass.
  • For the forward pass, use a texture array to access cascade shadow maps.
  • Allow cascade configuration, such as cascade count, split distances, shadow map size, and depth bias.
  • Make the system suitable for large-scale terrain and planetary rendering.
  • Keep the implementation compatible with the existing OpenGlobus rendering pipeline.

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

0