mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
largely based on work by @rextimmy: add premultiplied alpha
This commit is contained in:
parent
c1e99364b7
commit
bd21a207ef
6 changed files with 37 additions and 11 deletions
|
|
@ -115,6 +115,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue