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

[Public WebGL] Out-of-bounds ReadPixels and CopyTex*Image* behavior

We standardized this to read zeros in WebGL 1. However, this is
trickier in WebGL 2 because of PBOs and the new PACK_ pixelstore

I propose that we change this (at least for WebGL 2) to "Out-of-bounds
pixels are not written to the destination during reads from a
framebuffer (ReadPixels or CopyTex*Image*), leaving the values in the
destination buffer unchanged. Partially-out-of-bounds reads will only
write in-bounds pixels to the destination buffer."

This should be at easy or easier to implement, and be much more
performant, since implementations can just restrict the size of their
read and draw rects for these operations.

I would really rather make out-of-bounds reads of this sort an
INVALID_OPERATION, but a change to an error is more likely to be
breaking in terms of existing content. While it's also a breaking
change from OpenGL, I don't believe it is a porting concern, since
porting can be fixed by changing its behavior to match what I outline
above at the Emscripten (or other) level, though.

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