How to make a 1D lut in C++ for GLSL
问题 I'm beginning to understand how to implement a fragment shader to do a 1D LUT but I am struggling to find any good resources that tell you how to make the 1D LUT in C++ and then texture it. So for a simple example given the following 1D lut below: Would I make an array with the following data? int colorLUT[255] = {255, 254, 253, ..., ..., ..., 3, 2, 1, 0}; or unsigned char I guess since I'm going to be texturing it. If this is how to create the LUT, then how would I convert it to a texture?