ext.R16_EXT
Red 16-bit unsigned format. Color-renderable.
ext.RG16_EXT
RG 16-bit unsigned format. Color-renderable.
ext.RGB16_EXT
RGB 16-bit unsigned format.
ext.RGBA16_EXT
RGBA 16-bit unsigned format. Color-renderable.
ext.R16_SNORM_EXT
Red 16-bit signed normalized format.
ext.RG16_SNORM_EXT
RG 16-bit signed normalized format.
ext.RGB16_SNORM_EXT
RGB 16-bit signed normalized format.
ext.RGBA16_SNORM_EXT
RGBA 16-bit signed normalized format.
let ext = gl.getExtension("EXT_texture_norm16");
Texture formats
The WebGLRenderingContext.texImage2D()
method accepts new formats when EXT_texture_norm16
is enabled. Example calls:
// imageData = Uint16Array
gl.texImage2D(gl.TEXTURE_2D, 0, ext.R16_EXT, 1, 1, 0, gl.RED, gl.UNSIGNED_SHORT, imageData);
gl.texImage2D(gl.TEXTURE_2D, 0, ext.RG16_EXT, 1, 1, 0, gl.RG, gl.UNSIGNED_SHORT, imageData);
gl.texImage2D(gl.TEXTURE_2D, 0, ext.RGB16_EXT, 1, 1, 0, gl.RGB, gl.UNSIGNED_SHORT, imageData);
gl.texImage2D(gl.TEXTURE_2D, 0, ext.RGBA16_EXT, 1, 1, 0, gl.RGBA, gl.UNSIGNED_SHORT, imageData);
// imageData = Int16Array
gl.texImage2D(gl.TEXTURE_2D, 0, ext.R16_SNORM_EXT, 1, 1, 0, gl.RED, gl.SHORT, imageData);
gl.texImage2D(gl.TEXTURE_2D, 0, ext.RG16_SNORM_EXT, 1, 1, 0, gl.RG, gl.SHORT, imageData);
gl.texImage2D(gl.TEXTURE_2D, 0, ext.RGB16_SNORM_EXT, 1, 1, 0, gl.RGB, gl.SHORT, imageData);
gl.texImage2D(gl.TEXTURE_2D, 0, ext.RGBA16_SNORM_EXT, 1, 1, 0, gl.RGBA, gl.SHORT, imageData);
Renderbuffer formats
The WebGLRenderingContext.renderbufferStorage()
method accepts ext.R16_EXT
, ext.RG16_EXT
and ext.RGBA16_EXT
as internal formats to create renderbuffers in these formats. Example calls:
gl.renderbufferStorage(gl.RENDERBUFFER, ext.R16_EXT, 1, 1);
gl.renderbufferStorage(gl.RENDERBUFFER, ext.RG16_EXT, 1, 1);
gl.renderbufferStorage(gl.RENDERBUFFER, ext.RGBA16_EXT, 1, 1);
Specifications Browser compatibility
Loadingâ¦
See alsoWebGLRenderingContext.getExtension()
WebGLRenderingContext.texImage2D()
WebGLRenderingContext.renderbufferStorage()
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4