Draws primitives. See https://www.w3.org/TR/webgpu/#rendering-operations for the detailed specification.
The number of vertices to draw.
Optional
instanceCount: numberThe number of instances to draw.
Optional
firstVertex: numberOffset into the vertex buffers, in vertices, to begin drawing from.
Optional
firstInstance: numberFirst instance to draw.
Draws indexed primitives. See https://www.w3.org/TR/webgpu/#rendering-operations for the detailed specification.
The number of indices to draw.
Optional
instanceCount: numberThe number of instances to draw.
Optional
firstIndex: numberOffset into the index buffer, in indices, begin drawing from.
Optional
baseVertex: numberAdded to each index value before indexing into the vertex buffers.
Optional
firstInstance: numberFirst instance to draw.
Draws indexed primitives using parameters read from a GPUBuffer. See https://www.w3.org/TR/webgpu/#rendering-operations for the detailed specification. tightly packed block of five 32-bit unsigned integer values (20 bytes total), given in the same order as the arguments for GPURenderEncoderBase#drawIndexed. For example:
Buffer containing the indirect drawIndexed parameters.
Offset in bytes into indirectBuffer
where the drawing data begins.
Draws primitives using parameters read from a GPUBuffer. See https://www.w3.org/TR/webgpu/#rendering-operations for the detailed specification. packed block of four 32-bit unsigned integer values (16 bytes total), given in the same order as the arguments for GPURenderEncoderBase#draw. For example:
Buffer containing the indirect draw parameters.
Offset in bytes into indirectBuffer
where the drawing data begins.
Executes the commands previously recorded into the given GPURenderBundles as part of this render pass. When a GPURenderBundle is executed, it does not inherit the render pass's pipeline, bind groups, or vertex and index buffers. After a GPURenderBundle has executed, the render pass's pipeline, bind group, and vertex/index buffer state is cleared (to the initial, empty values). Note: The state is cleared, not restored to the previous state. This occurs even if zero GPURenderBundl | PURenderBundles are executed.
List of render bundles to execute.
Ends the labeled debug group most recently started by pushDebugGroup.
Sets the current GPUBindGroup for the given index.
The index to set the bind group at.
Bind group to use for subsequent render or compute commands. <!--The overload appears to be confusing bikeshed, and it ends up expecting this to define the arguments for the 5-arg variant of the method, despite the "for" explicitly pointing at the 3-arg variant. See
Optional
dynamicOffsets: Iterable<number>Array containing buffer offsets in bytes for each entry in
bindGroup
marked as buffer.hasDynamicOffset.-->
Sets the current GPUBindGroup for the given index, specifying dynamic offsets as a subset of a Uint32Array.
The index to set the bind group at.
Bind group to use for subsequent render or compute commands.
Array containing buffer offsets in bytes for each entry in
bindGroup
marked as buffer.hasDynamicOffset.
Offset in elements into dynamicOffsetsData
where the
buffer offset data begins.
Number of buffer offsets to read from dynamicOffsetsData
.
Sets the constant blend color and alpha values used with GPUBlendFactor#"constant" and GPUBlendFactor#"one-minus-constant" GPUBlendFactors.
The color to use when blending.
Sets the current index buffer.
Buffer containing index data to use for subsequent drawing commands.
Format of the index data contained in buffer
.
Optional
offset: numberOffset in bytes into buffer
where the index data begins. Defaults to 0
.
Optional
size: numberSize in bytes of the index data in buffer
.
Defaults to the size of the buffer minus the offset.
Sets the current GPURenderPipeline.
The render pipeline to use for subsequent drawing commands.
Sets the scissor rectangle used during the rasterization stage. After transformation into viewport coordinates any fragments which fall outside the scissor rectangle will be discarded.
Minimum X value of the scissor rectangle in pixels.
Minimum Y value of the scissor rectangle in pixels.
Width of the scissor rectangle in pixels.
Height of the scissor rectangle in pixels.
Sets the RenderState#stencilReference value used during stencil tests with the GPUStencilOperation#"replace" GPUStencilOperation.
The new stencil reference value.
Sets the current vertex buffer for the given slot.
The vertex buffer slot to set the vertex buffer for.
Buffer containing vertex data to use for subsequent drawing commands.
Optional
offset: numberOffset in bytes into buffer
where the vertex data begins. Defaults to 0
.
Optional
size: numberSize in bytes of the vertex data in buffer
.
Defaults to the size of the buffer minus the offset.
Sets the viewport used during the rasterization stage to linearly map from NDC|normalized device coordinates to viewport coordinates.
Minimum X value of the viewport in pixels.
Minimum Y value of the viewport in pixels.
Width of the viewport in pixels.
Height of the viewport in pixels.
Minimum depth value of the viewport.
Maximum depth value of the viewport.
Generated using TypeDoc
The index of the query in the query set.