How to get data from a float point texture?

Hi all.

I use OES_texture_float extension for WebGL.

I can write the float data in the texture and get data in the shader, moreover, after record in a texture in framebuffer, at the subsequent data read-out in shader I receive written float values, it means that textures working properly, but i can’t get this float values in javascript.
I do:


var buf = new Float32Array(3);
gl.readPixels(0, 0, 1, 1, gl.RGB, gl.FLOAT, buf);

, but I got nothing.
What am I doing wrong?

Thanks.

I think I read somewhere that you have to read it out as an RGBA (into a 4 element array).

Sorry - I don’t remember where I saw that - and I could very easily be wrong.

Of course, I tried to to get data and as gl. RGBA and as gl. ALPHA…
But, I didn’t get any results.
I believe that it’s not that I’m writing, and in webgl limitations or OES_texture_float extension is not ported to the end, or with errors.

Hey,

I’ve got exactly the same problem and already asked about it on webgl-dev group: https://groups.google.com/forum/#!topic … 83_IvYbPM4.

It seems that this feature is not listed in OES_texture_float spec (http://www.khronos.org/registry/gles/ex … _float.txt) or any other, so I’m not sure if we can expect it soon.

Any update on this issue? Are there any plans for an extension to support it?