Class ThinRenderTargetTexture
Hierarchy (View Summary)
- ThinTexture
- ThinRenderTargetTexture
Implements
Constructors
constructor
-
new ThinRenderTargetTexture(
engine: AbstractEngine,
size: TextureSize,
options: RenderTargetCreationOptions,
): ThinRenderTargetTextureInstantiates a new ThinRenderTargetTexture. Tiny helper class to wrap a RenderTargetWrapper in a texture. This can be used as an internal texture wrapper to benefit from the cache and to hold on the associated RTT
Parameters
- engine: AbstractEngine
Define the engine used to create and host the render target
- size: TextureSize
Define the size of the RTT to create
- options: RenderTargetCreationOptions
Define rendertarget options
Returns ThinRenderTargetTexture
- engine: AbstractEngine
Properties
anisotropic Filtering Level
With compliant hardware and browser (supporting anisotropic filtering) this defines the level of anisotropic filtering in the texture. The higher the better but the slower. This defaults to 4 as it seems to be the best tradeoff.
delay Load State
Define the current state of the loading sequence when in delayed load mode.
wrap R
| Value | Type | Description |
|---|---|---|
| 0 | CLAMP_ADDRESSMODE | |
| 1 | WRAP_ADDRESSMODE | |
| 2 | MIRROR_ADDRESSMODE |
Accessors
coordinates Mode
-
get coordinatesMode(): number
How a texture is mapped. Unused in thin texture mode.
Returns number
is2 D Array
-
get is2DArray(): boolean
Define if the texture is a 2d array texture (webgl 2) or if false a 2d texture.
Returns boolean
-
set is2DArray(value: boolean): void
Parameters
- value: boolean
Returns void
is3 D
-
get is3D(): boolean
Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.
Returns boolean
-
set is3D(value: boolean): void
Parameters
- value: boolean
Returns void
is Cube
-
get isCube(): boolean
Define if the texture is a cube texture or if false a 2d texture.
Returns boolean
-
set isCube(value: boolean): void
Parameters
- value: boolean
Returns void
render Target
-
Gets the render target wrapper associated with this render target
Returns Nullable<RenderTargetWrapper>
sampling Mode
-
get samplingMode(): number
Get the current sampling mode associated with the texture.
Returns number
wrap U
-
get wrapU(): number
Value Type Description 0 CLAMP_ADDRESSMODE 1 WRAP_ADDRESSMODE 2 MIRROR_ADDRESSMODE Returns number
-
set wrapU(value: number): void
Parameters
- value: number
Returns void
wrap V
-
get wrapV(): number
Value Type Description 0 CLAMP_ADDRESSMODE 1 WRAP_ADDRESSMODE 2 MIRROR_ADDRESSMODE Returns number
-
set wrapV(value: number): void
Parameters
- value: number
Returns void
Methods
delay Load
-
Triggers the load sequence in delayed load mode.
Returns void
dispose
-
Dispose the texture and release its associated resources.
Parameters
- disposeOnlyFramebuffers: boolean = false
if set to true it will dispose only the frame buffers (default: false)
Returns void
- disposeOnlyFramebuffers: boolean = false
get Base Size
-
Get the base size of the texture. It can be different from the size if the texture has been resized for POT for instance
Returns ISize
the base size
get Class Name
-
Get the class name of the texture.
Returns string
"ThinRenderTargetTexture"
get Internal Texture
-
Get the underlying lower level texture from Babylon.
Returns Nullable<InternalTexture>
the internal texture
get Size
is Ready
-
Get if the texture is ready to be used (downloaded, converted, mip mapped...).
Returns boolean
true if fully ready
release Internal Texture
-
Release and destroy the underlying lower level texture aka internalTexture.
Returns void
resize
-
Resize the texture to a new desired size. Be careful as it will recreate all the data in the new texture.
Parameters
- size: TextureSize
Define the new size. It can be:
- a number for squared texture,
- an object containing { width: number, height: number }
Returns void
- size: TextureSize
update Sampling Mode
-
Update the sampling mode of the texture. Default is Trilinear mode.
Value Type Description 1 NEAREST_SAMPLINGMODE or NEAREST_NEAREST_MIPLINEAR Nearest is: mag = nearest, min = nearest, mip = linear 2 BILINEAR_SAMPLINGMODE or LINEAR_LINEAR_MIPNEAREST Bilinear is: mag = linear, min = linear, mip = nearest 3 TRILINEAR_SAMPLINGMODE or LINEAR_LINEAR_MIPLINEAR Trilinear is: mag = linear, min = linear, mip = linear 4 NEAREST_NEAREST_MIPNEAREST 5 NEAREST_LINEAR_MIPNEAREST 6 NEAREST_LINEAR_MIPLINEAR 7 NEAREST_LINEAR 8 NEAREST_NEAREST 9 LINEAR_NEAREST_MIPNEAREST 10 LINEAR_NEAREST_MIPLINEAR 11 LINEAR_LINEAR 12 LINEAR_NEAREST mag: magnification filter (close to the viewer) min: minification filter (far from the viewer) mip: filter used between mip map levels
Parameters
- samplingMode: number
Define the new sampling mode of the texture
- generateMipMaps: boolean = false
Define if the texture should generate mip maps or not. Default is false.
Returns void
- samplingMode: number
This is a tiny helper class to wrap a RenderTargetWrapper in a texture usable as the input of an effect.