pub fn planar_pass_needed(
has_targets: bool,
water_has_slot: bool,
rt_transparent_active: bool,
) -> boolExpand description
Whether the transparent pass has to render its planar mirrors this frame.
Water prefers the mirror to the per-pixel ray trace: a water surface is a plane, so one mirrored scene render resolves it exactly, at a fraction of the cost of a ray per pixel, and the wave normal only has to perturb the lookup. A trace off the per-fragment wave normal is hypersensitive at grazing angles and lands on the probe / sky fallback wherever it misses, which reads as a chrome sheet rather than water. Glass keeps the trace (a pane shows what is genuinely behind it), so a world of glass alone still skips the re-render while ray tracing is live.
has_targets is whether any mirror target exists at all, water_has_slot
whether a visible water surface holds one, and rt_transparent_active
whether the pass would otherwise trace.