1. Hmm, makes sense. I calculate the angle as a dot product of the view and light vectors:

Code:
```vec4 wPos = mWorld*gl_Vertex; //world matrix * "in" vertex position
vec3 lPos = vec3(0.0, 10000.0, 5000.0);

vec3 V = normalize(wPos.xyz - eyePosition);
vec3 L = normalize(lPos - eyePosition);

float theta = dot(L, V);``` 2. But that is not what the formula needs. You are only calculating the cosine of the angle not the actual angle. The formula, according to what I see, needs the actual angle - IE: the arccosine(dot(L,V))

Note that for:

cos(theta) and cos^2(theta) you can do:

dot(L,V) and dot(L,V) * dot(L,V) respectively. 3. Sorry for the slow replying. I'm running out of free time these days (I'm done working weekends now though...hopefully that'll give me a bit more play time ).

I tried:
Code:
```float theta = dot(L, V);
float acosTheta = acos(theta);
float acosTheta2 = acosTheta*acosTheta;```
Using acosTheta in place of theta in the formulas, the the overall result is the same - no colour changes (using acos did require me to remove the coefficient multipliers, as with them the sky was too dark).

There's something here somewhere, that I'm (frustratingly) just not getting. Mathematically, everything looks like it should do what it's supposed to.

Could it be affected by sky sphere tessellation? Not likely, but it's just a thought. 4. No idea- this is actually the part of the formula I had trouble with as well. Regardless of the sun position I could not get sunset skies without significantly altering mie and rayleigh along with the sun position. It was almost as if Rayleigh and Mie were different during the day as opposed to sunset which is not how I understood the system according to the GDC document. If Rayleigh and Mie change over time then how do they change and based on what mathematical formula? If Rayleigh and Mie can stay constant then why do we not see the orange and reds like the demo shows? Popular pages Recent additions 