Skip to content

ngl: Use fp16 for colors

Matthias Clasen requested to merge half-float into master

This reduces the size of our Vertex struct from 48 to 24 bytes.

As for, why this is using fp16 instead of rgba8888:

  • we already have colors as floats, and do some cpu-side computations on them, so going back to rgba8888 might incur rounding errors
  • some vague thoughts about hdr content (might be irrelevant, since such content would probably be in textures)
Edited by Matthias Clasen

Merge request reports