Function createDepthPyramidTask
-
createDepthPyramidTask(
engine: EngineContext,
scene: SceneContext,
opts: DepthPyramidRenderTargetTaskOptions | DepthPyramidTaskOptions,
): TaskParameters
- engine: EngineContext
- scene: SceneContext
- opts: DepthPyramidRenderTargetTaskOptions | DepthPyramidTaskOptions
Returns Task
Create a frame-graph task that rebuilds
pyramidfromsource()into the FRAME command encoder each frame. Order it right after the pass that produces the depth (e.g.addTaskAfter(scene, task, depthPrepassTask)) so the pyramid reflects THIS frame's depth. ATexture2Dsource must match the pyramid's size (resize the pyramid with it); a render-target source resizes the pyramid automatically.