View Full Version : compressing normals/tangents vector

08-20-2008, 07:26 AM
Does it make sense to pass normals and tangent/bi-tangent as 'colors', i.e. XYZ==RGB to save bandwidth? I'd like to store my per-vertex tangent matrices in 3x 4-byte RGBA, and store a second normal (or vertex color) in the three remaining alpha components.

I was wondering if there's a catch as I've heard some drivers convert 32-bit colors to float before passing down the pipe...but I suppose this was just FP (e.g. glColor3*) and not VAR/VBO, correct?

08-20-2008, 09:06 AM
You can pass them as

1) attributes,
2) textures (as you say)
3) texel buffers (TBO)

Any of the three can be stored & passed as bytes.

If I understood correctly the last argument : the 32bit-texels RGBA are always converted to 4 [0,1] floats while byte-attributes keep their [0,255] values.

In my opinion it makes more sense to pass them as attributes, if your VAR/VBO system is flexible.