CLASSES
TagsA - Z

RenderTargetTexture

BaseTextureTextureTargetTexture

Description

class RenderTargetTexture extends Texture

Constructor

new RenderTargetTexture(name, size, scene, generateMipMaps, doNotChangeAspectRatio, type, isCube, samplingMode, generateDepthBuffer, generateStencilBuffer, isMulti)

Parameters

Name Type Description
name string
size any
scene Nullable<Scene>
optional generateMipMaps boolean
optional doNotChangeAspectRatio boolean
optional type number
optional isCube boolean
optional samplingMode number
optional generateDepthBuffer boolean
optional generateStencilBuffer boolean

Members

isCube : boolean

static REFRESHRATE_RENDER_ONCE : number

static REFRESHRATE_RENDER_ONEVERYFRAME : number

static REFRESHRATE_RENDER_ONEVERYTWOFRAMES : number

renderListPredicate : AbstractMesh) => boolean

Use this predicate to dynamically define the list of mesh you want to render.

If set, the renderList property will be overwritten.

renderList : Nullable<Array<AbstractMesh>>

Use this list to define the list of mesh you want to render.

renderParticles : boolean

renderSprites : boolean

coordinatesMode : number

activeCamera : Nullable<Camera>

customRenderFunction : (opaqueSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>, beforeTransparents: () => void) => void

useCameraPostProcesses : boolean

ignoreCameraViewport : boolean

onBeforeBindObservable : Observable<RenderTargetTexture>

An event triggered when the texture is unbind.

@type {BABYLON.Observable}

onAfterUnbindObservable : Observable<RenderTargetTexture>

An event triggered when the texture is unbind.

@type {BABYLON.Observable}

onAfterUnbind : () => void

onBeforeRenderObservable : Observable<number>

An event triggered before rendering the texture

@type {BABYLON.Observable}

onBeforeRender : number) => void

onAfterRenderObservable : Observable<number>

An event triggered after rendering the texture

@type {BABYLON.Observable}

onAfterRender : number) => void

onClearObservable : Observable<Engine>

An event triggered after the texture clear

@type {BABYLON.Observable}

onClear : Engine) => void

clearColor : Color4

renderTargetOptions : RenderTargetCreationOptions

samples : number

refreshRate : number

canRescale : boolean

Methods

resetRefreshCounter() void

addPostProcess(postProcess) void

Parameters

Name Type Description
postProcess PostProcess

clearPostProcesses(dispose) void

Parameters

Name Type Description
optional dispose boolean

removePostProcess(postProcess) void

Parameters

Name Type Description
postProcess PostProcess

getRenderSize() number

scale(ratio) void

Parameters

Name Type Description
ratio number

getReflectionTextureMatrix() Matrix

resize(size) void

Parameters

Name Type Description
size any

render(useCameraPostProcess, dumpForDebug) void

Parameters

Name Type Description
optional useCameraPostProcess boolean
optional dumpForDebug boolean

setRenderingOrder(renderingGroupId, opaqueSortCompareFn, alphaTestSortCompareFn, transparentSortCompareFn) void

Overrides the default sort function applied in the renderging group to prepare the meshes.

This allowed control for front to back rendering or reversly depending of the special needs.

     * @param renderingGroupId The rendering group id corresponding to its index

Parameters

Name Type Description
renderingGroupId number The rendering group id corresponding to its index
optional opaqueSortCompareFn Nullable<(a: SubMesh, b: SubMesh) => number> The opaque queue comparison function use to sort.
optional alphaTestSortCompareFn Nullable<(a: SubMesh, b: SubMesh) => number> The alpha test queue comparison function use to sort.

setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil) void

Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.

     * @param renderingGroupId The rendering group id corresponding to its index

Parameters

Name Type Description
renderingGroupId number The rendering group id corresponding to its index
autoClearDepthStencil boolean Automatically clears depth and stencil between groups if true.

clone() RenderTargetTexture

serialize() any

disposeFramebufferObjects() void

dispose() void