[/b]
Yes. That does work. Now my question is, is the original code supposed to work? In the Orange book under “Color Space Conversions” it also has the color vector pre-mulitplying the matrix.
Sounds familar to me. I have the same problem, but it is even a littlebit more weird:
I have a simple color-conversion-function to XYZ and back in my shader to do some tonemapping. This function works exactly as it should except in one shader!! On this shader, and only on this shader, the matrix is transposed and I have no idea why, especially since it started to happen with drivers above 81.xx only (before this release, everything was fine).