Optional
geometry: IGeometryAdds a compute pass to the backlog.
The label for the compute pass.
The WGSL code for the compute shader.
An optional array of textures to use in the compute pass.
Optional
workgroupsize: { The created RenderPass object.
Adds a main render pass to the backlog.
The material to use for the render pass.
Adds a render pass to the backlog.
The label for the render pass.
The material to use for the render pass.
The geometry to use for the render pass.
An optional array of textures to use in the render pass.
The created RenderPass object.
Creates a main render pipeline for a given material. This pipeline combines the output of other render passes.
The uniform buffer for the pipeline.
The material to use for the pipeline.
The created GPURenderPipeline.
Creates a render pipeline for a given material.
The uniform buffer for the pipeline.
The material to use for the pipeline.
The created GPURenderPipeline.
Creates a render target texture.
The width of the render target.
The height of the render target.
An object containing the texture and texture view for the render target.
Starts the rendering loop.
The initial time.
The maximum frames per second.
Optional
onFrame: ((frame: number) => void)An optional callback function to be called on each frame.
The Renderer class is responsible for managing the WebGPU rendering context, creating and executing render passes, and handling resources like buffers and textures.