diff --git a/Engine/source/terrain/glsl/terrFeatureGLSL.cpp b/Engine/source/terrain/glsl/terrFeatureGLSL.cpp index b9105cdd2..7761a8545 100644 --- a/Engine/source/terrain/glsl/terrFeatureGLSL.cpp +++ b/Engine/source/terrain/glsl/terrFeatureGLSL.cpp @@ -624,8 +624,8 @@ void TerrainDetailMapFeatGLSL::processPix( Vector &component meta->addStatement( new GenOp( " @ *= @.y * @.w;\r\n", detailColor, detailInfo, inDet ) ); - meta->addStatement( new GenOp( " @ = lerp( @, @ + @, @ );\r\n", - outColor, outColor, baseColor, detailColor, detailBlend ) ); + meta->addStatement( new GenOp( " @ += @ * @;\r\n", + outColor, detailColor, detailBlend)); meta->addStatement( new GenOp( " }\r\n" ) ); @@ -824,7 +824,7 @@ void TerrainMacroMapFeatGLSL::processPix( Vector &componentL } // Add to the blend total. - meta->addStatement( new GenOp( " @ = max( @, @ );\r\n", blendTotal, blendTotal, detailBlend ) ); + meta->addStatement( new GenOp( " @ += @;\r\n", blendTotal, detailBlend ) ); Var *detailColor = (Var*)LangElement::find( "macroColor" ); if ( !detailColor ) @@ -877,8 +877,8 @@ void TerrainMacroMapFeatGLSL::processPix( Vector &componentL Var *outColor = (Var*)LangElement::find( getOutputTargetVarName(target) ); - meta->addStatement( new GenOp( " @ = lerp( @, @ + @, @ );\r\n", - outColor, outColor, outColor, detailColor, detailBlend ) ); + meta->addStatement(new GenOp(" @ += @ * @;\r\n", + outColor, detailColor, detailBlend)); meta->addStatement( new GenOp( " }\r\n" ) );