Skip to content

Reflection Probes

For specular reflections, EntropyPortal uses Reflection Probes. These capture the surrounding environment into high-resolution cubemaps.

  • Used for specific areas (e.g., a room, a shiny object).
  • Use Box Projection (Parallax Correction) to align reflections with room geometry.
  • Stored in a TextureCubeArray.
  • A fallback probe that captures the sky and distant geometry.
  • Always available if no local probe overlaps the object.

The ProbeVolumeService manages reflection probes alongside light probes.

  1. Scheduling: The service prioritizes probes based on visibility and update frequency settings.
  2. Rendering: The scene is rendered 6 times (once per face) into a cubemap target.
  3. Prefiltering: The cubemap is convolved with the BRDF to generate mipmaps for different roughness levels (radiance).
graph TD
    Sync[Sync with Scene] --> Check{Dirty?}
    Check -->|Yes| Queue[Queue for Capture]

    Queue --> Render[Render High-Res Cubemap]
    Render --> Mips[Generate Mipmaps]
    Mips --> Filter["Compute Shader:<br/>Prefilter Radiance"]
    Filter --> Array[Write to TextureCubeArray]
  1. Storage: The final result is copied into the TextureCubeArray bin corresponding to its resolution (128, 256, 512, or 1024).

During the base pass:

  1. The shader finds the ReflectionProbeIndex for the current cluster. Reflection probes are treated as lights in the clustering system.
  2. It samples the reflection probe at the appropriate mip level based on surface roughness.
  3. It applies Box Projection if enabled to correct for perspective.