Made some more calculations. I think I have an idea how to create the final LUT now...