Precalculating palette luminance instead of doing it in shader.