Gets the ambient occlusion shadow intensity multiplier.
Sets the ambient occlusion shadow intensity multiplier and marks the material parameters as dirty.
Gets the culling mode settings.
Gets the depth check comparison function.
Sets the depth check comparison function.
Gets whether depth buffer updates are enabled.
Sets whether depth buffer updates are enabled.
Gets the double-sided rendering state.
Sets the double-sided rendering state, adjusting internal cull modes accordingly.
Gets the emissive intensity multiplier.
Sets the emissive intensity multiplier and marks the material parameters as dirty.
Gets the microfacet metallic factor.
Sets the microfacet metallic factor and marks the material parameters as dirty.
Gets the normal tangent scale.
Sets the normal tangent scale and marks the material parameters as dirty.
Gets the opacity component of the albedo color.
Sets the opacity component of the albedo color, automatically enabling transparent rendering and disabling depth writing if opacity is less than 1.0.
Gets the microfacet roughness factor.
Sets the microfacet roughness factor and marks the material parameters as dirty.
Gets the WGSL custom shader code containing entry points.
Sets the WGSL custom shader code and marks the material as dirty.
Gets whether transparency blending is enabled.
Sets whether transparency blending is enabled. Automatically sets depthWriteEnabled to false if transparent is true.
Instantiates a new ShaderMaterial.
Shader options containing script code and custom parameters.
Releases custom shader material resources (GPUBuffers) and unregisters entries from the VRAM tracker.
Active context.
Resolves GPUBindGroup (group index 2) containing baseline material bindings. Updates baseline uniform buffers and binds actual standard textures.
Active context.
Baseline material GPUBindGroup.
Resolves the custom GPUBindGroup (group index 3) containing active parameter values. Returns null if no custom parameters were initialized during construction.
Active context.
Custom parameter GPUBindGroup or null.
Compiles or returns the cached GPURenderPipeline corresponding to this custom shader configuration.
Active context.
Primitive geometry topology type.
Geometry index buffer type.
OptionalcullMode: GPUCullModeCulling mode override.
The compiled GPURenderPipeline.
ProtectedonInvalidate cached bind group when properties change.
ProtectedresolveAsynchronously loads pending texture strings in the background and resolves them into Texture objects.
Updates custom shader parameters at runtime. Writes data to GPU uniform buffers immediately, altering visual features on the next frame. Re-allocates storage buffers if the float size count changes.
Map of updated parameter values.
Legacy alias for setParameters().
Map of updated parameter values.
Unique material identification key.
Flag indicating if parameter properties are dirty, requiring a new bind group build.
Secondary material rendered on top of the current pass. Assign a ShaderMaterial here to layer a second render pass (e.g., outline effect) over the primary material. The next pass automatically uses the same geometry and instance matrices, drawn immediately after.
Material class type string tag used for fast runtime polymorphism checks.
ShaderMaterial represents a fully customizable, user-driven shading material. Enables integration of bespoke WGSL vertex and fragment shader scripts, providing dynamic group 3 uniform buffers to drive animations and parameters. Automatically maps dummy group 2 resources to fulfill baseline pipeline signatures.