1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-05 06:40:09 +00:00

better transitions

This commit is contained in:
glassmancody.info 2021-10-24 17:13:42 -07:00
parent 1e40d27318
commit 9cbbd2fff5
2 changed files with 6 additions and 0 deletions

View File

@ -659,7 +659,10 @@ namespace MWRender
mParticleNode->addChild(program);
for (int particleIndex = 0; particleIndex < ps->numParticles(); ++particleIndex)
{
ps->getParticle(particleIndex)->setAlphaRange(osgParticle::rangef(mPrecipitationAlpha, mPrecipitationAlpha));
ps->getParticle(particleIndex)->update(0, true);
}
ps->getOrCreateStateSet();
ps->setUserValue("simpleLighting", true);

View File

@ -29,6 +29,9 @@ void paintClouds(inout vec4 color)
color = texture2D(diffuseMap, diffuseMapUV);
color.a *= passColor.a * opacity;
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)