Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Results clamped

  1. #11
    Advanced Member Frequent Contributor
    Join Date
    Apr 2004
    Posts
    999

    Re: Results clamped

    I'm not following you, all your textures are already in GL_RGB16F_ARB format and you're reading back the values in float so there is no clamping. If you write 8.0 as output in the fragment shader you will get back 8.0. if you sample from a texture in your fragment shader it will return the value in the texture but know that if you uploaded the data to that texture with GL_UNSIGNED_BYTE, the values in that texture will always be in the range 0.0-1.0. There's a big difference between the internal and external data format. The internal format defines how the data is stored within the texture while the external format defines how the data is represented in system memory.

  2. #12
    Intern Newbie
    Join Date
    May 2008
    Location
    Cyprus
    Posts
    32

    Re: Results clamped

    Aha. Now i understand. So the problem is tha i use Unsigned_Byte at the input texture. I have to use GL_FLIOT.
    I tried to use GL_FLOAT but i get exception. i need to convert my data from char to float before.

    When you said convert it alone to 16bit what you meant exactly? something like what i described in my previous post?

    EDIT
    -----
    Ok i found what to do and now i get the values i pass normally back....Thansk again. Only thing i need somehow to change the iamge reader to return floats instead of unsigned char because i cant load them like they are on texture..

Posting Permissions

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