WEBGL_shader_pixel_local_storage
WebGL working group (public_webgl 'at' khronos.org)
Chris Dalton, Rive
Kenneth Russell, Google Inc.
Shahbaz Youssefi, Google Inc.
Kelsey Gilbert, Mozilla Corp.
Geoff Lang, Google Inc.
Kimmo Kinnunen, Apple Inc.
Members of the WebGL working group
Last modified date: December 06, 2022
Revision: 1
WebGL extension #49
Written against the WebGL API 2.0 specification.
This extension exposes the ANGLE_shader_pixel_local_storage functionality to WebGL.
The following WebGL-specific behavioral changes apply:
isCoherent()
, rather than the
existence of a similar extension string.
FramebufferMemorylessPixelLocalStorageANGLE
is not supported.
FramebufferPixelLocalStorageInterruptANGLE
and
FramebufferPixelLocalStorageRestoreANGLE
are not supported.
WEBGL_shader_pixel_local_storage
is enabled, the following WebGL
extensions are enabled implicitly:
OES_draw_buffers_indexed
EXT_color_buffer_float
EXT_color_buffer_half_float
Consult the above extension for documentation, issues and new functions and enumerants.
[Exposed=(Window,Worker), LegacyNoInterfaceObject] interface WEBGL_shader_pixel_local_storage { const GLenum MAX_PIXEL_LOCAL_STORAGE_PLANES_WEBGL = 0x96E0; const GLenum MAX_COLOR_ATTACHMENTS_WITH_ACTIVE_PIXEL_LOCAL_STORAGE_WEBGL = 0x96E1; const GLenum MAX_COMBINED_DRAW_BUFFERS_AND_PIXEL_LOCAL_STORAGE_PLANES_WEBGL = 0x96E2; const GLenum PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_WEBGL = 0x96E3; const GLenum LOAD_OP_ZERO_WEBGL = 0x96E4; const GLenum LOAD_OP_CLEAR_WEBGL = 0x96E5; const GLenum LOAD_OP_LOAD_WEBGL = 0x96E6; const GLenum STORE_OP_STORE_WEBGL = 0x96E7; const GLenum PIXEL_LOCAL_FORMAT_WEBGL = 0x96E8; const GLenum PIXEL_LOCAL_TEXTURE_NAME_WEBGL = 0x96E9; const GLenum PIXEL_LOCAL_TEXTURE_LEVEL_WEBGL = 0x96EA; const GLenum PIXEL_LOCAL_TEXTURE_LAYER_WEBGL = 0x96EB; const GLenum PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGL = 0x96EC; const GLenum PIXEL_LOCAL_CLEAR_VALUE_INT_WEBGL = 0x96ED; const GLenum PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_WEBGL = 0x96EE; GLboolean isCoherent(); undefined framebufferTexturePixelLocalStorageWEBGL(GLint plane, WebGLTexture? texture, GLint level, GLint layer); undefined framebufferPixelLocalClearValuefvWEBGL(GLint plane, Float32List value, optional GLuint srcOffset = 0); undefined framebufferPixelLocalClearValueivWEBGL(GLint plane, Int32List value, optional GLuint srcOffset = 0); undefined framebufferPixelLocalClearValueuivWEBGL(GLint plane, Uint32List value, optional GLuint srcOffset = 0); undefined beginPixelLocalStorageWEBGL(sequence<GLenum> loadops); undefined endPixelLocalStorageWEBGL(sequence<GLenum> storeops); undefined pixelLocalStorageBarrierWEBGL(); any getFramebufferPixelLocalStorageParameterWEBGL(GLint plane, GLenum pname); };
false
, the application must call
pixelLocalStorageBarrierWEBGL()
between rendering passes that touch the same
pixel.
texture
has been deleted, generates an INVALID_OPERATION
error.
If texture
was generated by a different WebGL2RenderingContext
than
this one, generates an INVALID_OPERATION
error.
value
has less than srcOffset + 4
elements, generates an
INVALID_VALUE
error.
value
has less than srcOffset + 4
elements, generates an
INVALID_VALUE
error.
value
has less than srcOffset + 4
elements, generates an
INVALID_VALUE
error.
pname
accepts the following new tokens.
GLint
for all additional parameters.
pname | returned type |
---|---|
MAX_PIXEL_LOCAL_STORAGE_PLANES_WEBGL | GLint |
MAX_COLOR_ATTACHMENTS_WITH_ACTIVE_PIXEL_LOCAL_STORAGE_WEBGL | GLint |
MAX_COMBINED_DRAW_BUFFERS_AND_PIXEL_LOCAL_STORAGE_PLANES_WEBGL | GLint |
PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_WEBGL | GLint |
loadops
accepts the following new tokens:
loadops |
---|
LOAD_OP_ZERO_WEBGL |
LOAD_OP_CLEAR_WEBGL |
LOAD_OP_LOAD_WEBGL |
storeops
accepts the following new tokens:
storeops |
---|
STORE_OP_STORE_WEBGL |
pname
accepts the following new tokens.
pname | returned type |
---|---|
PIXEL_LOCAL_FORMAT_WEBGL | GLenum |
PIXEL_LOCAL_TEXTURE_NAME_WEBGL | WebGLTexture? |
PIXEL_LOCAL_TEXTURE_LEVEL_WEBGL | GLint |
PIXEL_LOCAL_TEXTURE_LAYER_WEBGL | GLint |
PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGL | Float32Array |
PIXEL_LOCAL_CLEAR_VALUE_INT_WEBGL | Int32Array |
PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_WEBGL | Uint32Array |
Revision 1, 2022/12/06