Core guide
Opt-in render culling
Skip clearly offscreen bounded commands without changing simulation.
Live example
See Opt-in render culling in action
Enable culling and attach conservative world bounds to camera-scoped render commands.
How it works
Culling is disabled by default. When enabled, the renderer uses the active camera's conservative visibility query and skips only definitely offscreen bounded commands; visible, touching, and unbounded commands remain.
Public types
WebGpuRendererOptions.cull_offscreenRenderCommand.boundsBounds
Minimum viable example
const renderer = await create_webgpu_renderer({ canvas, width: 800, height: 450, cull_offscreen: true });
camera.draw(() => {
frame.draw_commands([{ kind: "texture", draw: { texture }, bounds: enemy_bounds }]);
});Scope and limitations
Bounds are caller-provided world-space hints. Occlusion culling, automatic bounds calculation, and projection changes are deferred.