- Implemented Wall blend modes

- fixed: set color for "shaded" modes - though it's still not yet properly implemented.
This commit is contained in:
Rachael Alexanderson 2016-11-20 18:36:26 -05:00
commit dadee080e4
2 changed files with 8 additions and 1 deletions

View file

@ -199,7 +199,12 @@ void RenderPolyWall::Render(const TriMatrix &worldToClip)
}
else
{
PolyTriangleDrawer::draw(args, TriDrawVariant::DrawSubsector, TriBlendMode::AlphaBlend);
args.uniforms.destalpha = (Line->linedef->flags & ML_ADDTRANS) ? 256 : (uint32_t)(256 - Line->linedef->alpha * 256);
args.uniforms.srcalpha = (uint32_t)(Line->linedef->alpha * 256);
if (args.uniforms.destalpha == 0 && args.uniforms.srcalpha == 256)
PolyTriangleDrawer::draw(args, TriDrawVariant::DrawSubsector, TriBlendMode::AlphaBlend);
else
PolyTriangleDrawer::draw(args, TriDrawVariant::DrawSubsector, TriBlendMode::Add);
}
RenderPolyDecal::RenderWallDecals(worldToClip, Line, SubsectorDepth);