Hi! I found this shader from Martinsh (cloudy skybox): https://www.youtube.com/watch?v=Ajg8Xi9hGVE
and I wanted to add a sun to the skybox. I made this:
You can see that the clouds are enlighted by the sun but you can’t see the sun. To see the sun without clouds, you can make gl_FragColor = sunColor;
My aim was to correctly mix sunColor and couldsColor, but I don’t know exacly how I could do that. I tried several things with mix function but without a good result and when I simply make the addition of couldsColor and sunColor, I can’t see the sun…
Thanks for your help!
EDIT: Solved: I just had to clamp clouds beetween 0 and 1 because it seems clouds could have negative value: