Smoothed opacity in clouds
This commit is contained in:
parent
273585dd8a
commit
704fe839d9
1 changed files with 6 additions and 0 deletions
|
@ -187,10 +187,16 @@ Color CloudBasicLayerRenderer::getColor(BaseCloudsModel *model, const Vector3 &e
|
|||
col.a = (segments[i].length >= transparency_depth) ? 1.0 : (segments[i].length / transparency_depth);
|
||||
result.mask(col);
|
||||
}
|
||||
|
||||
// Opacify when hitting inside_length limit
|
||||
if (inside_length >= transparency_depth)
|
||||
{
|
||||
result.a = 1.0;
|
||||
}
|
||||
else if (inside_length >= transparency_depth * 0.8)
|
||||
{
|
||||
result.a += (1.0 - result.a) * ((inside_length - transparency_depth * 0.8) / (transparency_depth * 0.2));
|
||||
}
|
||||
|
||||
double a = result.a;
|
||||
result = parent->getAtmosphereRenderer()->applyAerialPerspective(start, result).final;
|
||||
|
|
Loading…
Reference in a new issue