mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 07:11:33 +00:00
better transitions
This commit is contained in:
parent
1e40d27318
commit
9cbbd2fff5
2 changed files with 6 additions and 0 deletions
|
@ -659,7 +659,10 @@ namespace MWRender
|
||||||
mParticleNode->addChild(program);
|
mParticleNode->addChild(program);
|
||||||
|
|
||||||
for (int particleIndex = 0; particleIndex < ps->numParticles(); ++particleIndex)
|
for (int particleIndex = 0; particleIndex < ps->numParticles(); ++particleIndex)
|
||||||
|
{
|
||||||
ps->getParticle(particleIndex)->setAlphaRange(osgParticle::rangef(mPrecipitationAlpha, mPrecipitationAlpha));
|
ps->getParticle(particleIndex)->setAlphaRange(osgParticle::rangef(mPrecipitationAlpha, mPrecipitationAlpha));
|
||||||
|
ps->getParticle(particleIndex)->update(0, true);
|
||||||
|
}
|
||||||
|
|
||||||
ps->getOrCreateStateSet();
|
ps->getOrCreateStateSet();
|
||||||
ps->setUserValue("simpleLighting", true);
|
ps->setUserValue("simpleLighting", true);
|
||||||
|
|
|
@ -29,6 +29,9 @@ void paintClouds(inout vec4 color)
|
||||||
color = texture2D(diffuseMap, diffuseMapUV);
|
color = texture2D(diffuseMap, diffuseMapUV);
|
||||||
color.a *= passColor.a * opacity;
|
color.a *= passColor.a * opacity;
|
||||||
color.xyz = clamp(color.xyz * gl_FrontMaterial.emission.xyz, 0.0, 1.0);
|
color.xyz = clamp(color.xyz * gl_FrontMaterial.emission.xyz, 0.0, 1.0);
|
||||||
|
|
||||||
|
// ease transition between clear color and atmosphere/clouds
|
||||||
|
color = mix(vec4(gl_Fog.color.xyz, color.a), color, passColor.a * passColor.a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void paintMoon(inout vec4 color)
|
void paintMoon(inout vec4 color)
|
||||||
|
|
Loading…
Reference in a new issue