Function readTexturePixelsRGBA8
-
readTexturePixelsRGBA8(
engine: EngineContext,
texture: Texture2D | CubeTexture,
options?: TextureReadbackOptions,
): Promise<TextureReadbackResult>Parameters
- engine: EngineContext
- texture: Texture2D | CubeTexture
- options: TextureReadbackOptions = {}
Returns Promise<TextureReadbackResult>
Read a sampleable color texture without changing it or requiring COPY_SRC usage. Normalized/float/compressed inputs become RGBA8; sRGB transfer encoding is preserved, linear inputs stay linear, and values clamp to [0,1]. No tone mapping, exposure, alpha unpremultiplication or implicit orientation correction is applied.
Rejects depth/stencil, integer, multisampled, non-sampleable, destroyed and wrong-device textures. Only already-submitted rendering is observed; an active frame is not flushed.