Depth
View sourceDepth-component texture format (0x1902, DEPTH_COMPONENT).
Enum
Selects a WebGL texture format or sized internal format.
Use the channel formats with texture upload calls and the sized formats as internal storage formats. Floating-point, integer, and sized formats may require a WebGL 2 context or the corresponding extension.
import { TextureFormat } from '@wimaengine/render-webgl'
gl.texImage2D(
gl.TEXTURE_2D,
0,
TextureFormat.RGBA8,
width,
height,
0,
TextureFormat.RGBA,
gl.UNSIGNED_BYTE,
pixels
)Depth-component texture format (0x1902, DEPTH_COMPONENT).
Single red-channel texture format (0x1903, RED).
Alpha-channel texture format (0x1906, ALPHA).
Three-channel RGB texture format (0x1907, RGB).
Four-channel RGBA texture format (0x1908, RGBA).
Luminance texture format (0x1909, LUMINANCE).
Luminance-plus-alpha texture format (0x190A, LUMINANCE_ALPHA).
Eight-bit normalized RGB internal format (0x8051, RGB8).
Eight-bit normalized RGBA internal format (0x8058, RGBA8).
Sixteen-bit floating-point RGBA internal format (0x881A, RGBA16F).
Sixteen-bit floating-point RGB internal format (0x881B, RGB16F).
Thirty-two-bit floating-point RGBA internal format (0x8814, RGBA32F).
Thirty-two-bit floating-point RGB internal format (0x8815, RGB32F).
Thirty-two-bit signed-integer RGBA internal format (0x8D82, RGBA32I).
Thirty-two-bit signed-integer RGB internal format (0x8D83, RGB32I).
Sixteen-bit signed-integer RGBA internal format (0x8D88, RGBA16I).
Sixteen-bit signed-integer RGB internal format (0x8D89, RGB16I).
Eight-bit signed-integer RGBA internal format (0x8D8E, RGBA8I).
Eight-bit signed-integer RGB internal format (0x8D8F, RGB8I).