Add global blendDepth slider and update default blendDepth for mats

This commit is contained in:
Lukas Aldershaab 2021-01-03 01:26:19 +01:00
parent db496fa0c4
commit 60a10f4334
5 changed files with 62 additions and 13 deletions

View file

@ -803,7 +803,14 @@ bool TerrainCellMaterial::setupPass( const SceneRenderState *state,
mConsts->set( mFogDataConst, fogData );
}
mConsts->setSafe( mBlendDepthConst, Con::getFloatVariable("$Terrain::BlendDepth", 0.2f) );
if (String::isEmpty(Con::getVariable("$Terrain::BlendDepth")))
{
mConsts->setSafe(mBlendDepthConst, 0.2f);
}
else
{
mConsts->setSafe(mBlendDepthConst, Con::getFloatVariable("$Terrain::BlendDepth"));
}
mConsts->setSafe( mFogColorConst, sceneData.fogColor );