AdvancedReadonlyattachedThe scene outputs attached after the target colour; see RenderPassOptions#attachedOutputs
Bit for this pass: the built-in one it was given, or the one its name was assigned
ReadonlycameraCamera this pass draws from, or null to draw from the view's own camera
See RenderPassOptions#camera. While render runs, the GPU viewport is the camera's rect.
Optional ReadonlydescriptionHuman-readable explanation of what this pass contributes to the frame
OptionaldescriptorShader, state and topology this pass uses for every mesh, from RenderPassOptions#descriptor
ReadonlymaterialShader bits a material adds when it draws in this pass, so it writes the attached outputs
Each attached output's bits entry for this pass's name, in order. A material with a template of its own ignores them.
ReadonlynameThe pass's name; see RenderPassOptions#name
ReadonlyopaqueColour texture the copy lands in, as given in CopyOpaquePassOptions#opaqueColorHandle
ReadonlyoutputThe output each fragment location of a material shader in this pass writes: color, then each attached output
ReadonlypipeThe view pipe of the renderer this pass was built for
OptionalconditionOptional per-frame check; returning false skips the pass, prepare and render included
The graph asks it before any pass draws, once the scene's transforms and the view's camera are up to date for the frame. Without one, the pass runs every frame.
The current frame's render session
Whether the pass should run this frame
Releases the GPU resources this pass owns alone
The graph calls it when the graph is destroyed. Override it to free the shaders, bind groups or render targets your pass created, leaving alone anything it only borrowed.
Runs before any pass draws or any render target is bound, once every pass's camera is current
Override it to upload GPU buffers early. The default does nothing.
The current frame's render session
Copies its camera's colour target into CopyOpaquePass#opaqueColorHandle
The current frame's render session
Reads its camera's colour target and produces CopyOpaquePass#opaqueColorHandle
The builder recording this pass's resource accesses
Copies a camera's opaque picture into a texture for glass to sample
Glass can't sample the target it draws into, so transmissive and blended refractive materials refract a copy taken after the opaque draw. createDefaultGraph3D copies the view's camera into PassContext#opaqueColor. For another camera, add one after the draws it copies and before the passes that sample it; passes on other targets can run in between. The graph skips the copy on frames where nothing samples it.
On WebGL, give the renderer
useBackBuffer: truewhen a view draws glass. Without it, a view drawn straight to an opaque canvas (the defaultbackgroundAlpha: 1) gets an empty copy, so its glass refracts nothing. The pass warns once when it copies the view's picture with the setting off.