I'm working on a particle system using transform feedback, and I would like to know if it is possible to render to anything other than floats, like halfs, using Transform Feedback (OpenGL 3.3)? It would save some bytes and possibly speed up the process a little bit.


You can write unsigned integers and use bit manipulation to pack data into them into half of those integers.

You can use the ARB_shading_language_packing extension to help out in this process; it's pretty widely supported, even on older AMD HD3-5xxx cards (though I make no claim as to how well this actually works. They simply claim to support it).

| improve this answer | |
  • \$\begingroup\$ Do you have any information about if that's a worthy optimization? \$\endgroup\$ – Kromster Feb 27 '14 at 6:04
  • \$\begingroup\$ @KromStern NicolBolas hasn't been active around SO/SE for about 6 months, so I think it's unlikely he will be able to provide any further information. Personally, I would expect this, like most optimizations, to only be helpful in select few situations, for instance if you have an ungodly number of particles. \$\endgroup\$ – bcrist Feb 27 '14 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.