Skip to main content

RenderTargetProvider.TextureType

Enum

Specifies what kind of render target it is.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Specifies what kind of render target it is. Some texture types, for example TextureCubemap, need additional properties set on the rendering camera to work correctly.

Index

Example

//@input Asset.Texture renderTarget

// Change the render target from a regular 2d render target to a cubemap
if (script.renderTarget.control.textureType == RenderTargetProvider.TextureType.Texture2D) {
script.renderTarget.control.textureType = RenderTargetProvider.TextureType.TextureCubemap;
}

Enumeration Members

Texture2D

Texture2D: number

A 2d texture. Render targets are this type by default.


Texture2DArray

Texture2DArray: number

A 2D array texture allowing for multiple layers in a single texture.


Texture3D

Texture3D: number

A 3D texture (volume texture) with width, height, and depth dimensions.


TextureCubemap

TextureCubemap: number

A cubemap render target.