MeshDistanceMaterial is internally used for implementing shadow mapping for PointLights and RectAreaLights.
Can also be used to customize the shadow casting of an object by assigning an instance of MeshDistanceMaterial to Object3D.customDistanceMaterial.
parameters — (optional) an object with one or more properties defining the material's appearance. Any property of the material (including any property inherited from Material) can be passed in here.
See the base Material class for common properties.
The far value of the light's internal shadow camera.
Whether the material is affected by fog. Default is false.
The color map. May optionally include an alpha channel, typically combined with .transparent or .alphaTest. Default is null.
The near value of the point light's internal shadow camera.
The position of the point light in world space.
An adaptive bias which depends on the polygon's slope relative to the camera. Applied only if .useSlopeScaledBias is set to true. Default is 0. For materials used for shadow mapping this property is auto-assigned from LightShadow.slopeScaledBias. The exception is ESM shadows, which set slopeScaledBias to 0.5.
Enables or disables .slopeScaledBias. Default is false. For materials used for shadow mapping this property is auto-assigned to true.
See the base Material class for common methods.
For more info on how to obtain the source code of this module see this page.