Does length just add the rgb values together then? so (0.5, 0.25, 0.15) would equal 0.9?
Compare the two ways closely, you will see that your way has a biased distortortion down and left. mine does up/down left/right. Most noticable on the club scene(clothing dependant). My first glastastic shader did that, it's why i changed to this version.
This works on paper but doesn't give me the desired result..
int iMul = 2;
int Gi0 = (G0.r*256); // convert float to (0 - 255) range and discard the .0 .
int Gia0 = (Gi0/iMul)*iMul; // discard colour info by rounding error.
float Gf0 = (Gia0/256); // convert back to (0.0 - 1.0) range.
what have i done wrong and/or is there an easier way to remove colour resolution.
this should convert the range 0, 1, 2, 3, 4, 5 ,6... ect to 0, 0, 2, 2 ,4, 4, 6, 6 , 8, 8...ect
atm it seems to convert to 0 255 nothing inbetween(may be the normalmap routine borking it though).