configureDepthAlphaMask method

  1. @protected
void configureDepthAlphaMask({
  1. required TextureSource? texture,
  2. TextureTransform? transform,
  3. int texCoord = 0,
  4. double cutoff = 0.5,
  5. double alpha = 1.0,
})

Configures cutout coverage for the camera-depth and shadow passes.

Call with null texture to disable masked depth. The color shader must apply the same cutoff to produce matching coverage.

Implementation

@protected
void configureDepthAlphaMask({
  required TextureSource? texture,
  TextureTransform? transform,
  int texCoord = 0,
  double cutoff = 0.5,
  double alpha = 1.0,
}) {
  _depthMaskTexture = texture;
  _depthMaskTransform = transform ?? TextureTransform();
  _depthMaskTexCoord = texCoord.clamp(0, 1);
  _depthMaskCutoff = cutoff;
  _depthMaskAlpha = alpha;
}