I am writing a fragment shader, which needs two float values with some additional information for every fragment it calculates. These values will be calculated at the beginning of the program and won't change any time, so they could be stored in a 2D or 1D lookup table/array.
My first two choices for this would be:
1. rendering the values in a separate fragment shader to a 2D GL_RG32F texture or
2. calculating the values in a compute shader and store them in a vec2 array in a shader storage buffer object (the size of table is not known at compile time!).
What is the best/fastest way to store them and look them up? Is there another fast method?
Thank you for your help.