Home Reference Source
import {DepthComparisonMaterial} from 'postprocessing'
public class | source

DepthComparisonMaterial

Extends:

three~ShaderMaterial → DepthComparisonMaterial

A depth comparison shader material.

Constructor Summary

Public Constructor
public

constructor(depthTexture: Texture, camera: PerspectiveCamera)

Constructs a new depth comparison material.

Member Summary

Public Members
public set

depthBuffer: Texture

The depth buffer.

public set

depthPacking: DepthPackingStrategies

The depth packing strategy.

public

Method Summary

Public Methods
public

adoptCameraSettings(camera: Camera)

this method was deprecated. Use copyCameraSettings instead.

Copies the settings of the given camera.

public

copyCameraSettings(camera: Camera)

Copies the settings of the given camera.

public

setDepthBuffer(buffer: Texture, depthPacking: DepthPackingStrategies)

this method was deprecated. Use depthBuffer and depthPacking instead.

Sets the depth buffer.

Public Constructors

public constructor(depthTexture: Texture, camera: PerspectiveCamera) source

Constructs a new depth comparison material.

Params:

NameTypeAttributeDescription
depthTexture Texture
  • optional
  • default: null

A depth texture.

camera PerspectiveCamera
  • optional

A camera.

Public Members

public set depthBuffer: Texture source

The depth buffer.

public set depthPacking: DepthPackingStrategies source

The depth packing strategy.

public needsUpdate: boolean source

Public Methods

public adoptCameraSettings(camera: Camera) source

this method was deprecated. Use copyCameraSettings instead.

Copies the settings of the given camera.

Params:

NameTypeAttributeDescription
camera Camera

A camera.

public copyCameraSettings(camera: Camera) source

Copies the settings of the given camera.

Params:

NameTypeAttributeDescription
camera Camera

A camera.

public setDepthBuffer(buffer: Texture, depthPacking: DepthPackingStrategies) source

this method was deprecated. Use depthBuffer and depthPacking instead.

Sets the depth buffer.

Params:

NameTypeAttributeDescription
buffer Texture

The depth texture.

depthPacking DepthPackingStrategies
  • optional
  • default: RGBADepthPacking

The depth packing strategy.