[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] Proposal: Ignore UNPACK_FLIP_Y and UNPACK_PREMULTIPLY_ALPHA for ArrayBufferViews in WebGL 2

Unpack gets a lot trickier in WebGL 2 with the addition of settings
for unpacking a subrect from a buffer, and there are a ton of new
formats as well.

FLIP_Y and PREMULTIPLY_ALPHA for ArrayBufferViews do not provide new
functionality to users, since they can (and should) be marshaling
their data into the format they actually want before passing it to us.
They should not ask us to do costly transformations on their data
before actually doing the upload. These functionalities can be handled
completely with existing JS, and could even be retrofitted onto the
WebGL prototype via monkey-patching.

It's also not clear exactly how FLIP_Y interacts with the subrect
selection UNPACK_ options, which would need to be speced, and will
likely be confusing for users regardless.

Further, compressedTex(Sub)Image doesn't and won't support these, so
users are already forced to have their orientation and
alpha-premultiplied status pre-marshaled when using these APIs.

Lastly, these are slow paths, and as such are performance foot-guns,
even if we can (and do) warn when users use this functionality.

WebGL 2 gives us the opportunity to not-quite-maintain backwards
compatibility, and I believe we should leverage this here.

You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl