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

[Public WebGL] readPixles() can't access float values (OES_texture_float interaction)



Hi,

Although floating point textures are supported through the
"OES_texture_float" extension, it is currently not possible to read
back the pixels from the framebuffer.
Using readPixels() does only work für UNSIGNED_BYTE (as described in the spec).
The specification of the extension
(http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt)
doesn't mention interaction with readPixels() at all.

My question now is, is this an oversight or desired behavior? (or did
I simply overlook something?)

I think allowing readPixels() to play together with floating point
textures would be a highly desireable feature, esp. for
diagnosing/debugging and gpgpu.


Short example:

var pixels = new Float32Array(framebuffer.width * framebuffer.height * 4);
gl.readPixels(0, 0, framebuffer.width, framebuffer.height, gl.RGBA,
gl.FLOAT, pixels);

results in "Warning: WebGL: ReadPixels: type: invalid enum value 0x1406"


Rest Regards
Christian

-----------------------------------------------------------
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
-----------------------------------------------------------