regaegw efawefa efawfaw ewaf wae we faw fa. awe awe fwa fewfwaoiejf awoif jew fawjeo ;fjewf oiwejf ;owaf awe fawfa w? eaweo ijfawe fwef wa.f
Lerp and Time##
Well, from the looks of the video… he is just changing the color value of the “fog” for his shader along with the lighting values.
for the transitions you could probably just set some palletted colors(blue, red, dark blue) and lerp between them for smoothness.
So it would involve:
normalize the gameTime to a [0.0f…1.0f] situation between two of the colors… (think 0% to 100% of your transition from first to second)
javax.vecmath.Color3f might be the class to play with:
Color3f color1 = new Color3f(new Color("#990000")); Color3f color2 = new Color3f(new Color("#55AAFF")); Color3f colorIWant; colorIWant.interpolate(color1, color2, normalizedTransitionValue);
So then, just convert it to whatever format you need to supply for your shader… or you can even write your own shader so that you can just send the appropriate values and let it handle the transitions. You will need to be proficient in OpenGL, though.
Hope this helps,
Haha, the “like” suffices.
and you can just alter the title of your first posting title “Sky color changing formula” to something like “Sky color changing formula (solved)” .