Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Feb 27, 2024
1 parent d300ef0 commit 8fefed9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/api-reference/core/texture-formats.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Note that even though a GPU supports creating and sampling textures of a certain
| `rgb9e5ufloat` | <Ft f="rgb9e5ufloat" /> | <L f="rgb9e5ufloat" /> | <R f="rgb9e5ufloat" /> | `GL.RGB9_E5` |
| `rg11b10ufloat` | <Ft f="rg11b10ufloat" /> | <L f="rg11b10ufloat" /> | <R f="rg11b10ufloat" /> | `GL.R11F_G11F_B10F` |
| `rgb10a2unorm` | <Ft f="rgb10a2unorm" /> | <L f="rgb10a2unorm" /> | <R f="rgb10a2unorm" /> | `GL.RGB10_A2` |
| `rgb10a2unorm-webgl` | <Ft f="rgb10a2unorm-webgl" /> | <L f="rgb10a2unorm-webgl" /> | <R f="rgb10a2unorm-webgl" /> | `GL.RGB10_A2UI` |
| `rgb10a2uint-webgl` | <Ft f="rgb10a2uint-webgl" /> | <L f="rgb10a2uint-webgl" /> | <R f="rgb10a2uint-webgl" /> | `GL.RGB10_A2UI` |
| **6 bytes per pixel formats** | | | |
| `rgb16unorm-webgl` | <Ft f="rgb16unorm-webgl" /> | <L f="rgb16unorm-webgl" /> | <R f="rgb16unorm-webgl" /> | |
| `rgb16snorm-webgl` | <Ft f="rgb16snorm-webgl" /> | <L f="rgb16snorm-webgl" /> | <R f="rgb16snorm-webgl" /> | |
Expand Down
15 changes: 8 additions & 7 deletions docs/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,25 @@ To accelerate WebGPU development, luma.gl v9 drops support for legacy functional

**`@luma.gl/webgl`**

- Asynchronous shader compilation and linking significantly speeds up applications that create many `RenderPipelines`.
- Supported when the [KHR_parallel_shader_compile][KHR_parallel_shader_compile] WebGL extension is available.
WebGL is not dead yet! Browsers (Chrome in particular) are still adding extensions to WebGL 2, and luma.gl
is adding support for many of the new features through the [`DeviceFeatures`](/docs/api-reference/core/device-features) API.

New `Device.features` exposing new GPU parameters:
New `Device.features` that improve WebGL application performance:
- `compilation-status-async-webgl`: Asynchronous shader compilation and linking is used automatically when available and speeds up applications that create many `RenderPipelines`.

New `Device.features` that expose new WebGL GPU parameters:
- `depth-clip-control`: `parameters.unclippedDepth` - depth clipping can now be disabled if the feature is available.
- `provoking-vertex-webgl`: `parameters.provokingVertex` - controls which primitive vertex is used for flat shading.
- `polygon-mode-webgl`: `parameters.polygonMode` - enables wire frame rendering of polygons. Check the feature.
- `polygon-mode-webgl`: `parameters.polygonOffsetLine` - enables depth bias (polygon offset) for lines.
- `shader-clip-cull-distance-webgl`: `parameters.clipCullDistance0-7` - enables `gl_ClipDistance[] / gl_CullDistance[]`.

New `Device.features` enable new GLSL syntax
New `Device.features` that enable new GLSL syntax
- `shader-noperspective-interpolation-webgl`: GLSL vertex outputs and fragment inputs may be declared with a `noperspective` interpolation qualifier.
- `shader-conservative-depth-webgl`: GLSL `gl_FragDepth` qualifiers `depth_any` `depth_greater` `depth_less` `depth_unchanged` can enable early depth test optimizations.

New `Device.features` enable additional color format support:
New `Device.features` that enable additional WebGL color format support:
- `rgb9e5ufloat-renderable-webgl`: `rgb9e5ufloat` are renderable.
- `snorm8-renderable-webgl`: `r,rg,rgba8snorm` are renderable.
- `norm16-renderable-webgl`: `r,rg,rgba16norm` are renderable.
- `snorm16-renderable-webgl`: `r,rg,rgba16snorm` are renderable.

[KHR_parallel_shader_compile]: https://registry.khronos.org/webgl/extensions/KHR_parallel_shader_compile/
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const EXCEPTIONS: Partial<Record<TextureFormat, any>> = {
rgb9e5ufloat: {format: 'rgb', bbp: 4},
rg11b10ufloat: {format: 'rgb', bbp: 4},
rgb10a2unorm: {format: 'rgba', bbp: 4},
'rgb10a2unorm-webgl': {format: 'rgba', bbp: 4},
'rgb10a2uint-webgl': {format: 'rgba', bbp: 4},
// Depth/stencil
stencil8: {components: 1, bpp: 1, a: 'stencil'},
depth16unorm: {components: 1, bpp: 2, a: 'depth'},
Expand Down

0 comments on commit 8fefed9

Please sign in to comment.