Results 1 to 5 of 5

Thread: How to get data from a float point texture?

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    2

    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:
    Code :
    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.

  2. #2
    Senior Member
    Join Date
    May 2010
    Posts
    207

    Re: How to get data from a float point texture?

    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.

  3. #3
    Junior Member
    Join Date
    Jan 2011
    Posts
    2

    Re: How to get data from a float point texture?

    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.

  4. #4
    Junior Member
    Join Date
    Jan 2011
    Posts
    5

    Re: How to get data from a float point texture?

    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.

  5. #5
    Junior Member
    Join Date
    Jan 2011
    Posts
    5

    Re: How to get data from a float point texture?

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

Similar Threads

  1. Replies: 7
    Last Post: 11-08-2012, 05:42 PM
  2. Is it support Float Data Types in OpenMax DL?
    By gaurang2984 in forum OpenMAX
    Replies: 1
    Last Post: 01-01-1970, 12:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •