g-truc/ogl-samples — pull request #6 by hfink (2013-02-27 10:29:44+00:00)
Title: Improving gl-330 RGB10A2_UI sample.

Hey,

I looked into the current gl-330-texture-integer-rgb10a2ui example code. The example worked for me out of the box using 310.90 on a Quadro 6000. However, I improved the example by actually using GL_UNSIGNED_INT_2_10_10_10_REV as the data format as well, which also required the shader to deal with the 10-bit full RGB range. That seems to work nicely on my machine.

I have used GIMP for creating the new RGB10A2 DDS sample file using this plugin:

https://code.google.com/p/gimp-dds/

(NVIDIA's DDS Photoshop plugin doesn't support 10-bit packed.)

Note that the sample DDS file is upscaled from the 8-bit version, so it doesn't actually have higher precision than the others.

cheers,

Heinrich