Skip to content
github-actions[bot] edited this page Apr 3, 2024 · 39 revisions

Module: core

Table of contents

Type Aliases

Core

Specs

Utility

Other

QuadRendererOptions

Ƭ QuadRendererOptions<TType, TMaterial>: Object

Type parameters

Name Type
TType extends TextureDataType
TMaterial extends Material

Type declaration

Name Type Description
colorSpace ColorSpace ColorSpace of the renderTarget
height number height of the renderTarget
material TMaterial material to use for rendering
renderTargetOptions? QuadRendererTextureOptions Additional renderTarget options
renderer? WebGLRenderer Renderer instance to use
type TType TextureDataType of the renderTarget
width number Width of the render target

Defined in

src/core/QuadRenderer.ts:47


QuadRendererTextureOptions

Ƭ QuadRendererTextureOptions: Omit<RenderTargetOptions, "type" | "format" | "colorSpace" | "encoding" | "depthTexture" | "stencilBuffer" | "depthBuffer" | "internalFormat"> & { anisotropy?: number ; mapping?: Mapping }

Defined in

src/core/types.ts:71

Specs

GainMapMetadata

Ƭ GainMapMetadata: Object

This is the Metadata stored in an encoded Gainmap which is used to decode it and return an HDR image

Type declaration

Name Type Description
gainMapMax [number, number, number] This is log2 of max content boost, which is the maximum allowed ratio of the linear luminance for the Target HDR rendition relative to (divided by) that of the SDR image, at a given pixel.
gainMapMin [number, number, number] This is log2 of min content boost, which is the minimum allowed ratio of the linear luminance for the target HDR rendition relative to (divided by) that of the SDR image, at a given pixel.
gamma [number, number, number] This is the gamma to apply to the stored map values. Default Value ts [1, 1, 1] Remarks * Typically you can use a gamma of 1.0. * You can use a different value if your gain map has a very uneven distribution of log_recovery(x, y) values. For example, this might apply if a gain map has a lot of detail just above SDR range (represented as small log_recovery(x, y) values), and a very large map_max_log2 for the top end of the HDR rendition's desired brightness (represented by large log_recovery(x, y) values). In this case, you can use a map_gamma higher than 1.0 so that recovery(x, y) can precisely encode the detail in both the low end and high end of log_recovery(x, y).
hdrCapacityMax number Stores the value of hdr_capacity_max. This is log2 of the maximum display boost value for which the map is applied completely. Remarks * This value also affects how much to apply the gain map based on the display boost. * Must be greater than hdrCapacityMin. * Required. Logarithmic space
hdrCapacityMin number This is log2 of the minimum display boost value for which the map is applied at all. Remarks * This value also affects how much to apply the gain map based on the display boost. * Must be 0.0 or greater. Logarithmic space
offsetHdr [number, number, number] This is the offset to apply to the HDR pixel values during gain map generation and application. Default Value ts [1/64, 1/64, 1/64]
offsetSdr [number, number, number] This is the offset to apply to the SDR pixel values during gain map generation and application Default Value ts [1/64, 1/64, 1/64]

Defined in

src/core/types.ts:10

Utility

TextureDataTypeToBufferType

Ƭ TextureDataTypeToBufferType<TType>: TType extends typeof UnsignedByteType ? Uint8ClampedArray : TType extends typeof HalfFloatType ? Uint16Array : TType extends typeof UnsignedIntType ? Uint32Array : TType extends typeof ByteType ? Int8Array : TType extends typeof ShortType ? Int16Array : TType extends typeof IntType ? Int32Array : TType extends typeof FloatType ? Float32Array : never

Utility Type that translates three texture types to their TypedArray counterparts.

Type parameters

Name Type
TType extends TextureDataType

Defined in

src/core/QuadRenderer.ts:37


getDataTexture

getDataTexture(image): DataTexture

Utility function to obtain a DataTexture from various input formats

Parameters

Name Type
image DataTexture | EXR | RGBE | LogLuv

Returns

DataTexture

Defined in

src/core/get-data-texture.ts:14

Clone this wiki locally