Hi,
I'm trying to implement an atmospheric scattering in openGL. I'm using this "paper" as tutorial:
http://developer.amd.com/wordpress/media/2012/10/GDC_02_HoffmanPreetham.pdf
However I have some difficulties to understand certain points and to figure out some constants.
Basically I've to implement these formulas:
[attachment=31800:Screenshot from 2016-05-08 13-41-18.png]
Firstly i don't know if s is the distance from eye to the dome or the distance from eye to the light source (here sun) position.
Same for the angle theta I can't figure out if it's the angle from ground to sun or to the dome position the eye is looking at.
Secondly in this slide:
[attachment=31801:Screenshot from 2016-05-08 13-46-07.png]
It tells me the blue color of the sky will appears. I know it's cause of rayleigh scattering but there is something i can't understand. All the calculation in the formulas above give me a scalar: so how a white light of the sun wich is basically a vec3(1,1,1), will become blue when I multiply it by scalars, it will only get in gray scale because I will have for result for example vec3(0.8,0.8,0.8). I mean , if some different sky color appears, I must multiply the sun light with a vec3 to change the RGB value differently.