mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
Use the "proper" alpha value (i.e., the one from the original shader). This
makes the sky somewhat darker, but that probably just means we need more scattering or a brighter sun.
This commit is contained in:
parent
82f16e7f34
commit
5138f62aef
3 changed files with 2 additions and 4 deletions
|
@ -44,5 +44,5 @@ void main (void)
|
|||
float fCos = dot(v3LightPos, v3Direction) / length(v3Direction);
|
||||
float fMiePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + fCos*fCos) / pow(1.0 + g2 - 2.0*g*fCos, 1.5);
|
||||
gl_FragColor = gl_Color + fMiePhase * gl_SecondaryColor;
|
||||
gl_FragColor.a = 1.0; // gl_FragColor.b;
|
||||
gl_FragColor.a = gl_FragColor.b;
|
||||
}
|
||||
|
|
|
@ -44,5 +44,5 @@ void main (void)
|
|||
float fCos = dot(v3LightPos, v3Direction) / length(v3Direction);
|
||||
float fMiePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + fCos*fCos) / pow(1.0 + g2 - 2.0*g*fCos, 1.5);
|
||||
gl_FragColor = gl_Color + fMiePhase * gl_SecondaryColor;
|
||||
gl_FragColor.a = 1.0; // gl_FragColor.b;
|
||||
gl_FragColor.a = gl_FragColor.b;
|
||||
}
|
||||
|
|
|
@ -73,12 +73,10 @@ void Environment::renderAtmosphere(Camera& camera) {
|
|||
program->setUniform(locations[G_LOCATION], -0.990f);
|
||||
program->setUniform(locations[G2_LOCATION], -0.990f * -0.990f);
|
||||
|
||||
glFrontFace(GL_CW);
|
||||
glDepthMask(GL_FALSE);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glutSolidSphere(getAtmosphereOuterRadius(), 100, 50);
|
||||
glDepthMask(GL_TRUE);
|
||||
glFrontFace(GL_CCW);
|
||||
|
||||
program->release();
|
||||
|
||||
|
|
Loading…
Reference in a new issue