DepthMapPass is a pass that writes depth values to a depth map as a 32-bit value exploded over the 4 texture channels. This is used to render shadow maps, depth maps, etc.

Constructor

new()

Creates a new DepthMapPass object.

Variables

alphaMask:Texture2DBase

A texture providing alpha data to be able to prevent semi-transparent pixels to write to the alpha mask. Usually the diffuse texture when alphaThreshold is used.

alphaThreshold:Float

The minimum alpha value for which pixels should be drawn. This is used for transparency that is either invisible or entirely opaque, often used with textures for foliage, etc. Recommended values are 0 to disable alpha, or 0.5 to create smooth edges. Default value is 0 (disabled).

Inherited Variables

Inherited Methods

Defined by MaterialPassBase

dispose():Void

Cleans up any resources used by the current object.

Parameters:

deep

Indicates whether other resources should be cleaned up, that could potentially be shared across different instances.

setBlendMode(value:BlendMode):Void

The blend mode to use when drawing this renderable. The following blend modes are supported:

  • BlendMode.NORMAL: No blending, unless the material inherently needs it
  • BlendMode.LAYER: Force blending. This will draw the object the same as NORMAL, but without writing depth writes.
  • BlendMode.MULTIPLY
  • BlendMode.ADD
  • BlendMode.ALPHA