Optional
uniformsUniforms input to pass to a BindGroup.
Optional
storagesRead only or read/write storages input to pass to a BindGroup.
Optional
bindingsOptional
bindArray of already created bind groups to be used by this Material.
Optional
samplersOptional
texturesArray of already created Texture or MediaTexture to be used by this Material.
Whether this RenderMaterial should implicitly use the renderer camera and lights bind group.
Whether this RenderMaterial should be treated as transparent. Impacts the render pipeline blend property.
Whether this RenderMaterial should write to the depth buffer.
Whether this RenderMaterial should enable depth write.
Depth function to use with this RenderMaterial.
Format of the depth texture to use with this RenderMateria.l
A number representing a constant depth bias that is added to each fragment. Default to 0
.
A number representing the maximum depth bias of a fragment. Default to 0
.
A number representing a depth bias that scales with the fragment's slope. Default to 0
.
Optional
stencilDefine the stencil operations to use if any.
Defines how stencil comparisons and operations are performed for front-facing primitives.
Optional
back?: GPUStencilFaceStateDefines how stencil comparisons and operations are performed for back-facing primitives. If undefined, will fall back to front
values.
Optional
stencilReference?: numberSet the GPURenderPassEncoder stencil reference value used during stencil tests if any. Default to 0x000000
if a stencil is used.
Optional
stencilReadMask?: numberA bitmask controlling which stencil value bits are read when performing stencil comparison tests. Default to 0xFFFFFF
.
Optional
stencilWriteMask?: numberA bitmask controlling which stencil value bits are written to when performing stencil comparison tests. Default to 0xFFFFFF
.
The sampleCount of the RenderPass onto which we'll be drawing. Set internally.
When true
indicates that a fragment's alpha channel should be used to generate a sample
coverage mask. Default to false
.
Mask determining which samples are written to. Default to 0xFFFFFFFF
.
Cull mode to use with this RenderMaterial.
Optional
unclippedIf true
, indicates that depth clipping is disabled.
Requires the depth-clip-control feature to be enabled. Default to false
.
Vertices order to be used by the render pipeline.
Topology to use with this RenderMaterial, i.e. whether to draw triangles or points (see https://www.w3.org/TR/webgpu/#enumdef-gpuprimitivetopology).
Optional
targetsOptional array of one or multiple targets properties. Format property will be patched internally.
Base parameters used to create a RenderMaterial.