Skip to main content

evaluate_environment_lighting

Function evaluate_environment_lighting 

pub fn evaluate_environment_lighting(
    surface: &SurfaceParameters,
    position: [f32; 3],
    normal: [f32; 3],
    view_dir: [f32; 3],
    probes: Option<&EnvironmentProbeSet>,
    direct_fallback: [f32; 3],
    stylized: Option<&StylizedLightingParams>,
) -> EnvironmentLightingResult
Expand description

Portable bounded environment-probe evaluation and fallback policy. Evaluate bounded irradiance/specular probe lighting with an explicit direct-light fallback.

A result with used_probe == false is not an empty black frame: radiance is exactly direct_fallback. The caller can therefore use this API before backend probe resources are available without adding a second branch in its platform renderer. No allocations occur.