KhronosGroup / KhronosGroup/WebGL
WebGL Compositing under specified?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 2.9k
- Forks
- 704
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
I'm probably missing it but the WebGL 2.0 spec doesn't mention compositing at all or at least a search for "compositing" doesn't get any hits.
The WebGL 1.0 spec says
WebGL presents its drawing buffer to the HTML page compositor immediately before a compositing operation, but only if at least one of the following has occurred since the previous compositing operation:
- Context creation
- Canvas resize
clear,drawArrays, ordrawElementshas been called while the drawing buffer is the currently bound framebuffer
and later
5.14.11 Writing to the drawing buffer
OpenGL ES 2.0 has 3 calls which can render to the drawing buffer:
clear,drawArraysanddrawElements. Furthermore rendering can be directed to the drawing buffer or to a Framebuffer object. When rendering is directed to the drawing buffer, making any of the 3 rendering calls shall cause the drawing buffer to be presented to the HTML page compositor at the start of the next compositing operation.
cases not covered include the other forms of draw in WebGL2 drawArraysInstanced, drawElementsInstanced, drawRangeElements, also blitFrambuffer.
Also maybe not ambigous in the spec but if rasterization is disabled. For example gl.colorMask(false, false, false, false) or gl.enable(gl.RASTERIZER_DISCARD) or gl.drawBuffers([gl.NONE]) whether or not compositing should be triggered. As it is it seems like the spec says it should be triggered but it seem counter inituitive that not actually drawing to the canvas would cause a composite operation to be scheduled
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the WebGL 1.0 compositing language, especially section 5.14.11, with the WebGL 2.0 specification and the additional draw operations listed in the issue. Resolve how those operations and rasterization-disabled cases should affect presentation, then clarify the relevant WebGL 2.0 specification text; the issue is done when the behavior is unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100