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

DepthDownsamplingMaterial

Extends:

three~ShaderMaterial → DepthDownsamplingMaterial

Implements:

A depth downsampling shader material.

Based on an article by Eleni Maria Stea: https://eleni.mutantstargoat.com/hikiko/depth-aware-upsampling-6

Constructor Summary

Public Constructor
public

Constructs a new depth downsampling material.

Member Summary

Public Members
public set

depthBuffer: Texture

The depth buffer.

public set

depthPacking: DepthPackingStrategies

The depth packing strategy.

public
public set

normalBuffer: Texture

The normal buffer.

Method Summary

Public Methods
public

setDepthBuffer(buffer: Texture, depthPacking: DepthPackingStrategies)

this method was deprecated. Use depthBuffer and depthPacking instead.

Sets the depth buffer.

public

setNormalBuffer(value: Texture)

this method was deprecated. Use normalBuffer instead.

Sets the normal buffer.

public

setSize(width: Number, height: Number)

Sets the size of this object.

public
this method was deprecated. Use setSize() instead.

Sets the texel size.

Public Constructors

public constructor() source

Constructs a new depth downsampling material.

Public Members

public set depthBuffer: Texture source

The depth buffer.

public set depthPacking: DepthPackingStrategies source

The depth packing strategy.

public needsUpdate: boolean source

public set normalBuffer: Texture source

The normal buffer.

Public Methods

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: BasicDepthPacking

The depth packing strategy.

public setNormalBuffer(value: Texture) source

this method was deprecated. Use normalBuffer instead.

Sets the normal buffer.

Params:

NameTypeAttributeDescription
value Texture

The normal buffer.

public setSize(width: Number, height: Number) source

Sets the size of this object.

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.

public setTexelSize(x: Number, y: Number) source

this method was deprecated. Use setSize() instead.

Sets the texel size.

Params:

NameTypeAttributeDescription
x Number

The texel width.

y Number

The texel height.