New terrain blending

This commit is contained in:
Lukas Aldershaab 2020-12-29 02:00:14 +01:00
parent e92e945912
commit 4f472bf402
12 changed files with 967 additions and 179 deletions

View file

@ -68,6 +68,7 @@ TerrainMaterial::TerrainMaterial()
mMacroStrength( 0.7f ),
mMacroDistance( 500.0f ),
mParallaxScale( 0.0f ),
mBlendDepth( 0.5f ),
mIsSRGB(false),
mInvertRoughness(false)
{
@ -91,6 +92,9 @@ void TerrainMaterial::initPersistFields()
addField( "parallaxScale", TypeF32, Offset( mParallaxScale, TerrainMaterial ), "Used to scale the height from the normal map to give some self "
"occlusion effect (aka parallax) to the terrain material" );
addField("blendDepth", TypeF32, Offset(mBlendDepth, TerrainMaterial), "Depth for blending the textures using the new blending method by Lukas Joergensen."
"Higher numbers = larger blend radius.");
scriptBindMapSlot(DetailMap, TerrainMaterial, "Raises and lowers the RGB result of the Base Albedo up close.");
addField( "detailSize", TypeF32, Offset( mDetailSize, TerrainMaterial ), "Used to scale the detail map to the material square" );
addField( "detailStrength", TypeF32, Offset( mDetailStrength, TerrainMaterial ), "Exponentially sharpens or lightens the detail map rendering on the material" );