compute luminance