Merge branch 'alpha40_premul' of https://github.com/Azaezel/Torque3D into Preview4_0

This commit is contained in:
Areloch 2019-11-22 21:27:52 -06:00
commit 27ee09e491
6 changed files with 37 additions and 13 deletions

View file

@ -120,6 +120,10 @@ LangElement* ShaderFeatureHLSL::assignColor( LangElement *elem,
assign = new GenOp( "@ *= @", color, elem );
break;
case Material::PreMul:
assign = new GenOp("@.rgb = @.rgb + (@.rgb*(1.0-@.a))", color, elem, color, elem);
break;
case Material::AddAlpha:
assign = new GenOp( "@ += @ * @.a", color, elem, elem );
break;