LookupTexture
Extends:
A 3D lookup texture (LUT).
This texture can be used as-is in a WebGL 2 context. It can also be converted into a 2D texture.
Static Method Summary
Static Public Methods | ||
public static |
createNeutral(size: Number): LookupTexture Creates a neutral 3D LUT. |
|
public static |
from(texture: Texture): LookupTexture Creates a new 3D LUT by copying a given LUT. |
Constructor Summary
Public Constructor | ||
public |
constructor(data: TypedArray, size: Number) Constructs a cubic 3D lookup texture. |
Member Summary
Public Members | ||
public |
colorSpace: * |
|
public |
domainMax: Vector3 The upper bounds of the input domain. |
|
public |
domainMin: Vector3 The lower bounds of the input domain. |
|
public |
format: * |
|
public get |
this get was deprecated.
Indicates that this is an instance of LookupTexture3D. |
|
public |
magFilter: * |
|
public |
minFilter: * |
|
public |
|
|
public |
type: * |
|
public |
|
|
public |
wrapR: * |
|
public |
wrapS: * |
|
public |
wrapT: * |
Method Summary
Public Methods | ||
public |
applyLUT(lut: LookupTexture): LookupTexture Applies the given LUT to this one. |
|
public |
Converts the output of this LUT into sRGB color space. |
|
public |
Converts the output of this LUT into linear color space. |
|
public |
Converts the LUT data into float data. |
|
public |
this method was deprecated. LUTs are RGBA by default since three r137.
Converts this LUT into RGBA data. |
|
public |
Converts the LUT data into unsigned byte data. |
|
public |
scaleUp(size: Number, transferData: Boolean): Promise<LookupTexture> Scales this LUT up to a given target size using tetrahedral interpolation. |
|
public |
toDataTexture(): DataTexture Converts this LUT into a 2D data texture. |
Static Public Methods
public static createNeutral(size: Number): LookupTexture source
Creates a neutral 3D LUT.
Params:
Name | Type | Attribute | Description |
size | Number | The sidelength. |
public static from(texture: Texture): LookupTexture source
Creates a new 3D LUT by copying a given LUT.
Common image-based textures will be converted into 3D data textures.
Params:
Name | Type | Attribute | Description |
texture | Texture | The LUT. Assumed to be cubic. |
Public Constructors
Public Members
public colorSpace: * source
public format: * source
public get isLookupTexture3D: Boolean source
Indicates that this is an instance of LookupTexture3D.
public magFilter: * source
public minFilter: * source
public type: * source
public wrapR: * source
public wrapS: * source
public wrapT: * source
Public Methods
public applyLUT(lut: LookupTexture): LookupTexture source
Applies the given LUT to this one.
Params:
Name | Type | Attribute | Description |
lut | LookupTexture | A LUT. Must have the same dimensions, type and format as this LUT. |
public convertLinearToSRGB(): LookupTexture source
Converts the output of this LUT into sRGB color space.
public convertSRGBToLinear(): LookupTexture source
Converts the output of this LUT into linear color space.
public convertToRGBA(): LookupTexture source
Converts this LUT into RGBA data.
public convertToUint8(): LookupTexture source
Converts the LUT data into unsigned byte data.
This is a lossy operation which should only be performed after all other transformations have been applied.
public scaleUp(size: Number, transferData: Boolean): Promise<LookupTexture> source
Scales this LUT up to a given target size using tetrahedral interpolation.
public toDataTexture(): DataTexture source
Converts this LUT into a 2D data texture.
Please note that custom input domains are not carried over to 2D textures.
Return:
DataTexture | The texture. |