Fix precision of cast. Pack 3 luminance values to float, if still wrong
on some GPUs.