precalculate brightness values for speedup