Texture

DepthTexture

This class can be used to automatically save the depth information of a rendering into a texture. When using a WebGL 1 rendering context, DepthTexture requires support for the WEBGL_depth_texture extension.

Constructor

DepthTexture(width : Integer, height : Integer, type : Constant, mapping : Constant, wrapS : Constant, wrapT : Constant, magFilter : Constant, minFilter : Constant, anisotropy : Integer, format : Constant)

Properties

See the base Texture class for common properties - the following are also part of the texture class, but have different defaults here.

format

Either DepthFormat (default) or DepthStencilFormat. See format constants for details.

.isDepthTexture : Boolean

Read-only flag to check if a given object is of type DepthTexture.

type

Default is v3d.UnsignedIntType when using DepthFormat and v3d.UnsignedInt248Type when using DepthStencilFormat. See format constants for details.

magFilter

How the texture is sampled when a texel covers more than one pixel. The default is v3d.NearestFilter. See magnification filter constants for other choices.

minFilter

How the texture is sampled when a texel covers less than one pixel. The default is v3d.NearestFilter. See minification filter constants for other choices.

flipY

Depth textures do not need to be flipped so this is false by default.

.generateMipmaps

Depth textures do not use mipmaps.

Methods

See the base Texture class for common methods.

Source

For more info on how to obtain the source code of this module see this page.