Instantiates an HDRTexture from the following parameters.
The location of the HDR raw data (Panorama stored in RGBE format)
The scene the texture will be used in
The cubemap desired size (the more it increases the longer the generation will be)
Forces to not generate the mipmap if true
Specifies whether you want to extract the polynomial harmonics during the generation process
Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space)
Reserved flag for internal use.
Define the list of animation attached to the texture.
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.
Gets or sets the center of the bounding box associated with the cube texture It must define where the camera used to render the texture was set
Gets or sets the size of the bounding box associated with the cube texture When defined, the cubemap will switch to local mode
Get if the texture can rescale.
Define the UV chanel to use starting from 0 and defaulting to 0. This is part of the texture as textures usually maps to one uv set.
The texture coordinates mode. As this texture is stored in a cube format, please modify carefully.
Define the current state of the loading sequence when in delayed load mode.
Define if the texture contains data in gamma space (most of the png/jpg aside bump). HDR texture are usually stored in linear space. This only impacts the PBR and Background materials
Defines if the alpha value should be determined via the rgb values. If true the luminance of the pixel might be used to find the corresponding alpha value.
Define if the texture is having a usable alpha value (can be use for transparency or glossiness for instance).
Is Z inverted in the texture (useful in a cube texture).
In case a better definition than spherical harmonics is required for the diffuse part of the environment. You can set the irradiance texture to rely on a texture instead of the spherical approach. This texture need to have the same characteristics than its parent (Cube vs 2d, coordinates mode, Gamma/Linear, RGBD).
Define if the texture is a 2d array texture (webgl 2) or if false a 2d texture.
Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.
Gets wether or not the texture is blocking during loading.
Define if the texture is a cube texture or if false a 2d texture.
Gets or sets whether or not the texture contains RGBD data.
Define if the texture is a render target.
Intensity or strength of the texture. It is commonly used by materials to fine tune the intensity of the texture
With prefiltered texture, defined if the specular generation is based on a linear ramp. By default we are using a log2 of the linear roughness helping to keep a better resolution for average roughness values.
With prefiltered texture, defined the offset used during the prefiltering steps.
With prefiltered texture, defined the scale used during the prefiltering steps.
Gets or sets an object used to store user defined information.
Define the name of the texture.
Are mip maps generated for this texture or not.
Callback triggered when the texture has been disposed. Kept for back compatibility, you can use the onDisposeObservable instead.
An event triggered when the texture is disposed.
For internal use only. Please do not use.
Gets texture matrix rotation angle around Y axis radians.
Get the polynomial representation of the texture data. This is mainly use as a fast way to recover IBL Diffuse irradiance data.
Get the texture underlying format (RGB, RGBA...)
Get the texture underlying type (INT, FLOAT...)
Define the unique id of the texture in the scene.
Gets or sets the unique id of the texture
The texture URL.
Value | Type | Description |
---|---|---|
0 | CLAMP_ADDRESSMODE | |
1 | WRAP_ADDRESSMODE | |
2 | MIRROR_ADDRESSMODE |
Value | Type | Description |
---|---|---|
0 | CLAMP_ADDRESSMODE | |
1 | WRAP_ADDRESSMODE | |
2 | MIRROR_ADDRESSMODE |
Value | Type | Description |
---|---|---|
0 | CLAMP_ADDRESSMODE | |
1 | WRAP_ADDRESSMODE | |
2 | MIRROR_ADDRESSMODE |
Default anisotropic filtering level for the application. It is set to 4 as a good tradeoff between perf and quality.
Dispose the texture and release its associated resources.
Get the base size of the texture. It can be different from the size if the texture has been resized for POT for instance
the base size
Get the current class name of the texture useful for serialization or dynamic coding.
"HDRCubeTexture"
Get the underlying lower level texture from Babylon.
the insternal texture
Get the texture reflection matrix used to rotate/transform the reflection.
the reflection matrix
Get the size of the texture.
the texture size.
Get the texture transform matrix used to offset tile the texture for istance.
the transformation matrix
Get if the texture is ready to be used (downloaded, converted, mip mapped...).
true if fully ready
Get if the texture is ready to be consumed (either it is ready or it is not blocking)
true if ready or not blocking
Reads the pixels stored in the webgl texture and returns them as an ArrayBuffer. This will returns an RGBA array buffer containing either in values (0-255) or float values (0-1) depending of the underlying buffer type.
defines the face of the texture to read (in case of cube texture)
defines the LOD level of the texture to read (in case of Mip Maps)
defines a user defined buffer to fill with data (can be null)
The Array buffer containing the pixels data.
Release and destroy the underlying lower level texture aka internalTexture.
Scales the texture if is canRescale()
the resize factor we want to use to rescale
Set the texture reflection matrix used to rotate/transform the reflection.
Define the reflection matrix to set
Return a string representation of the texture.
the texture as a string
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
Define the new sampling mode of the texture
Parses a JSON representation of an HDR Texture in order to create the texture
Define the JSON representation
Define the scene the texture should be created in
Define the root url in case we need to load relative dependencies
the newly created texture after parsing
Helper function to be called back once a list of texture contains only ready textures.
Define the list of textures to wait for
Define the callback triggered once the entire list will be ready
Generated using TypeDoc
This represents a texture coming from an HDR input.
The only supported format is currently panorama picture stored in RGBE format. Example of such files can be found on HDRLib: http://hdrlib.com/