private static Vector4F AsHalf(Vector4F v, uint redMask, uint greenMask, uint blueMask, uint alphaMask) { v.X = (redMask > 0) ? HalfHelper.Unpack(HalfHelper.Pack(v.X)) : 0; v.Y = (greenMask > 0) ? HalfHelper.Unpack(HalfHelper.Pack(v.Y)) : 0; v.Z = (blueMask > 0) ? HalfHelper.Unpack(HalfHelper.Pack(v.Z)) : 0; v.W = (alphaMask > 0) ? HalfHelper.Unpack(HalfHelper.Pack(v.W)) : 0; return(v); }