Inertia's picture

half type

Just noticed that Ati's drivers support http://www.opengl.org/registry/specs/ARB/half_float_vertex.txt

16-Bit floating point makes sense for computer graphics, 32-Bit (or higher) precision is quite an overkill for Normals or Texture Coordinates. Do you think it would make sense to add new types to OpenTK like this?

  • half
  • half2
  • half3
  • half4

They don't necessarily have to support any arithmetic operations (use float|double for that), I'm rather thinking about a container that does the pack/unpack and can be easily added to Vertex structs.

Thoughts?

Edit: If I'm understanding http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/... page 21, section 1.5 correctly, we could use short to store it. SSE5 will support float->half and half->float conversion, so future iterations of Mono could improve conversion speed aswell.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

As long as we treat it as an opaque data type (ala IntPtr), this would be very nice.

I've added a new task at http://www.opentk.com/node/527 so we can keep track of this.