context.readPixels(0, 0, context.drawingBufferWidth, context.drawingBufferHeight, context.RGBA, context.FLOAT, pixels);
This is the code. I get this error in the console: WebGL: INVALID_ENUM: readPixels: invalid type
But this works perfectly fine:
context.readPixels(0, 0, context.drawingBufferWidth, context.drawingBufferHeight, context.RGBA, context.UNSIGNED_BYTE, pixels);
Float or int is supposed to be supported, but only unsigned_byte works. There's no resource online on how to correctly apply a type that seems to work. Everything follows a different pattern.
pixels
? – enhzflep May 24 '20 at 10:27