I am developing an application that should display the procedural sky, what I mean is that the sky has a daily cycle, which varies depending on what time it is in the simulation.
I saw a method somewhere in the past where they have a color palette:


Now, depending on some variable, such as time, somehow the code scans the image and uses a range of colors for the texture of the sky. Also, during sunrise / sunset, the code will scan for yellow, orange, red, as on the right.
I'm not sure what this is called, but I think this is what I need. I would like someone to show me or show me an example of using this technique with opengl and C ++.
On a side note, my skybox is not your average figure, but more - a sky-angle, as shown below

As you can see, there is no peak to the horizon of the sky, these are only two blue sides that you see that will have the sky (black is BG). I was wondering if there is a way that I could make a process / dynamic night sky on these two plains (without a visible seam between them), and as a side issue there is also such that the top of the plain disappears to alpha regardless of its night or day
Any explanation / example of how to scan a color code and then set it as a texture in OpenGL / C ++ is greatly appreciated.
source
share