Renderer · function

probeUpdateSchedule

Which probes to rebake on this frame.

Explained in Hello world.

function probeUpdateSchedule(layers: number, perFrame: number, frameIndex: number, out: Int32Array): number
import { probeUpdateSchedule } from '@driftengine/core';

Parameters

ParameterTypeDescription
layersnumber
perFramenumber
frameIndexnumber
outInt32Array

In depth

A grid rebaked in one frame is six draws of the world per probe. Sixty-four probes is 384 submissions in one frame and a hitch a viewer sees; EnvProbeArray already bakes a probe at a time for that reason and gates the whole grid until every layer is filled. What is here is the schedule, and the part of it that is easy to get wrong is not the bound — it is that every probe is reached. A subset chosen by distance, or by what moved, leaves some probe stale for ever, and a stale probe in a room whose light changed is a room lit by the previous scene.

A plain round robin, so it is also reproducible: the same frame index asks for the same probes, which is what the replay fingerprint needs and what makes a bug in it repeatable.