Closed
Bug 681903
Opened 13 years ago
Closed 13 years ago
[WebGL] please allow readPixels() for float
Categories
(Core :: Graphics: CanvasWebGL, enhancement)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
INVALID
People
(Reporter: christian.junker, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.215 Safari/535.1
Steps to reproduce:
Although floating point textures are supported through the following extension:
gl.getExtension("OES_texture_float");
it is not possible to read back the pixels from the framebuffer. using readPixels does only work für UNSIGNED_BYTE (as described in the spec.).
var pixels = new Float32Array(framebuffer.width * framebuffer.height * 4);
gl.readPixels(0, 0, framebuffer.width, framebuffer.height, gl.RGBA, gl.FLOAT, pixels);
Actual results:
Warning: WebGL: ReadPixels: type: invalid enum value 0x1406
Expected results:
an extension to the specified behaviour to allow a read back of float values would be desireable.
Severity: normal → enhancement
Component: General → Canvas: WebGL
OS: Linux → All
Product: Firefox → Core
QA Contact: general → canvas.webgl
Hardware: x86_64 → All
Version: 6 Branch → unspecified
Comment 1•13 years ago
|
||
Can you do this under another implementation? Chrome?
If not, this is more of a specification issue, please discuss this on the WebGL mailing list at http://www.khronos.org/webgl/public-mailing-list/
Thanks,
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
a similar request exists for chrome:
https://code.google.com/p/chromium/issues/detail?id=74271
unfortunately the specification of OES_texture_float, does not mention the interaction with readPixels() although i think this would be a desirable feature.
http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt
I will get in touch with the WebGL mailing list.
best regards
Comment 3•13 years ago
|
||
Please do ask the WebGL public mailing list, it's a good question.
On my side I'm leaning towards supporting that, provided that drivers do. This seems like a useful feature.
You need to log in
before you can comment on or make changes to this bug.
Description
•