Function: createEmptyTexture()
createEmptyTexture(
gl,width,height,format?):WebGLTexture
Defined in: rendering/shaders/utils/create-empty-texture.ts:18
Creates an empty WebGL texture of a given size, suitable for use as a render target color attachment.
Parameters
gl
WebGL2RenderingContext
The WebGL2 rendering context.
width
number
The texture width in pixels.
height
number
The texture height in pixels.
format?
RENDER_TARGET_FORMAT_KEYS = RENDER_TARGET_FORMAT.ldr
The color storage format, already resolved by
resolveRenderTargetFormat (i.e. never a format the context can't
actually render into). Defaults to RENDER_TARGET_FORMAT.ldr.
Returns
WebGLTexture
The created WebGL texture.