better transitions

pull/3204/head
glassmancody.info 3 years ago
parent 1e40d27318
commit 9cbbd2fff5

@ -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);

@ -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)

Loading…
Cancel
Save