Optional
frustumFrustum culling check to use. Accepts OBB
, sphere
or a boolean. Default to OBB
. When set to true
, OBB
is used.
Optional
DOMFrustumMargins (in pixels) to applied to the DOM Frustum to determine if this ProjectedMesh should be frustum culled or not.
Optional
receiveWhether the mesh should receive the shadows from shadow casting lights. If set to true
, the lights shadow map textures and sampler will be added to the material, and some shader chunks helpers will be added. Default to false
.
Optional
castWhether the mesh should cast shadows from shadow casting lights. If set to true
, the mesh will be automatically added to all shadow maps. If you want to cast only specific shadows, see shadow's addShadowCastingMesh method. Default to false
.
Optional
transmissiveWhether the mesh should be considered as transmissive, like glass or transparent plastic. Will be rendered after the non transmissive meshes and have the camera renderer transmissionTarget texture and sampler properties attached to it to handle transmission effect.
Optional
uniformsUniforms input to pass to a BindGroup.
Optional
storagesRead only or read/write storages input to pass to a BindGroup.
Optional
bindingsOptional
labelThe label of the Material, sent to various GPU objects for debugging purpose.
Optional
shadersShaders to use with this Material.
Optional
useWhether to compile the Material GPURenderPipeline or GPUComputePipeline asynchronously or not.
Optional
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.
Optional
useWhether this RenderMaterial should implicitly use the renderer camera and lights bind group.
Optional
transparentWhether this RenderMaterial should be treated as transparent. Impacts the render pipeline blend property.
Optional
depthWhether this RenderMaterial should write to the depth buffer.
Optional
depthWhether this RenderMaterial should enable depth write.
Optional
depthDepth function to use with this RenderMaterial.
Optional
depthFormat of the depth texture to use with this RenderMateria.l
Optional
cullCull mode to use with this RenderMaterial.
Optional
sampleThe sampleCount of the RenderPass onto which we'll be drawing. Set internally.
Optional
verticesVertices order to be used by the render pipeline.
Optional
topologyTopology 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.
Parameters used to create a Projected Render Material