[Public WebGL] Changes to unwritten fragment output attachment requirements

Jeff Gilbert ([email protected]) [email protected]
Thu Feb 28 13:00:04 PST 2019

Previously, as long as the fragment shader doesn't (statically) write
to a particular fragment output location (or index for
gl_FragData[index]), the color-attachment for that location remained
unchanged even if enabled via drawBuffers. To do this, the browser
generally had to mask out these unwritten attachments under the
covers, because the underlying OpenGL specs don't allow this.
(unwritten fragment outputs receive undefined values, which may or may
not mean they remain unchanged, but usually not) This increased draw
call overhead and reduces predictability.

In https://github.com/KhronosGroup/WebGL/pull/2780 , I proposed
tightening the requirements here, requiring that all
drawBuffers-enabled non-null color-attachments must have a declared
fragment output:

"If any draw buffer with an attachment does not have a defined
fragment shader output, draws

Content written according to the OpenGL specifications will continue
to work as expected, so Emscripten'd projects should see no changes.

I experimentally applied this restriction in Firefox Nightly about a
month ago, and I haven't heard of any related content breakage, so we
will be merging this proposal into the WebGL specs.

You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl

More information about the public_webgl mailing list