probe_bake.computeShader
Bakes irradiance-volume probes on the GPU — one thread per probe. Each thread casts N uniform-sphere rays and path-traces each one through up to `bounces` surface interactions: every path vertex contributes its emissive plus its albedo (carried on the triangle records by `compute…
probe_bake
Bakes irradiance-volume probes on the GPU — one thread per probe. Each
thread casts N uniform-sphere rays and path-traces each one through up
to bounces surface interactions: every path vertex contributes its
emissive plus its albedo (carried on the triangle records by
compute.buildBvh) times the shadowed direct light there, and a segment
that escapes contributes the sky. The resulting incoming radiance is
projected into 9 SH L2 coefficients (Monte Carlo weighted) and written
as 9 RGBA vec4s into output. Mirrors lightmap_bake's traversal +
light model.
Bindings (see bindings.yaml): output (read_write), probe_positions, bvh_nodes,
triangles, lights, params — all array<vec4<f32>>.
Usage: dispatch by identity with compute.dispatch("@builtin::systems.globalIllumination.probe_bake", ...) (buffers in bindings order) —
it resolves to the shader's stable guid and auto-compiles on first use (no setup).
Scoped to this part · feeds back into the world's score.