Merge remote-tracking branch 'lukaspj/Fuzzy-texture-border-fix' into release-3.7

This commit is contained in:
Daniel Buckmaster 2015-05-09 14:29:30 +10:00
commit 69f2efab8f
2 changed files with 6 additions and 7 deletions

View file

@ -545,8 +545,8 @@ void TerrainDetailMapFeatHLSL::processPix( Vector<ShaderComponent*> &component
Var *baseColor = (Var*)LangElement::find( "baseColor" );
Var *outColor = (Var*)LangElement::find( "col" );
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" ) );
@ -742,7 +742,7 @@ void TerrainMacroMapFeatHLSL::processPix( Vector<ShaderComponent*> &componentL
}
// Add to the blend total.
meta->addStatement( new GenOp( " @ = max( @, @ );\r\n", blendTotal, blendTotal, detailBlend ) );
meta->addStatement( new GenOp( " @ += @;\r\n", blendTotal, detailBlend ) );
// If this is a prepass then we skip color.
if ( fd.features.hasFeature( MFT_PrePassConditioner ) )
@ -815,9 +815,8 @@ void TerrainMacroMapFeatHLSL::processPix( Vector<ShaderComponent*> &componentL
//Var *baseColor = (Var*)LangElement::find( "baseColor" );
Var *outColor = (Var*)LangElement::find( "col" );
meta->addStatement( new GenOp( " @ = lerp( @, @ + @, @ );\r\n",
outColor, outColor, outColor, detailColor, detailBlend ) );
//outColor, outColor, baseColor, detailColor, detailBlend ) );
meta->addStatement(new GenOp(" @ += @ * @;\r\n",
outColor, detailColor, detailBlend));
meta->addStatement( new GenOp( " }\r\n" ) );

View file

@ -170,7 +170,7 @@ bool TerrainBlock::_initBaseShader()
desc.zDefined = true;
desc.zWriteEnable = false;
desc.zEnable = false;
desc.setBlend( true, GFXBlendSrcAlpha, GFXBlendOne );
desc.setBlend( true, GFXBlendSrcAlpha, GFXBlendInvSrcAlpha );
desc.cullDefined = true;
desc.cullMode = GFXCullNone;
desc.colorWriteAlpha = false;