1 Reply Latest reply on Nov 22, 2013 6:07 PM by xernobyl

    How to use HALFs in OpenGL's Transform Feedback?


      Is it possible output HALFs to a buffer using OpenGL's transform feedback? I've been trying it for a while without success. I can't find an example on how to do it. My code works with floats, but I can't make it work with halfs, using packHalf2x16 on the vertex shader.




      const vec3 pos = vec3(0.0, 0.0, 1.0);

      O0 = uvec4(packHalf2x16(pos.xy), packHalf2x16(vec2(pos.z, 0.0)), 0u, 0u);


      works, but if I remove "const" it doesn't work. Why? Is it supposed to be like that or is it a driver bug (old ATI Mobility Radeon HD 4650 with the latest windows 8.1 64bits drivers or similar)?