mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- Implemented Wall blend modes
- fixed: set color for "shaded" modes - though it's still not yet properly implemented.
This commit is contained in:
parent
4ed548a189
commit
dadee080e4
2 changed files with 8 additions and 1 deletions
|
@ -219,6 +219,7 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, AActor *thing, subse
|
||||||
args.uniforms.destalpha = 256;
|
args.uniforms.destalpha = 256;
|
||||||
args.uniforms.srcalpha = (uint32_t)(thing->Alpha * 256);
|
args.uniforms.srcalpha = (uint32_t)(thing->Alpha * 256);
|
||||||
args.SetTexture(tex, false);
|
args.SetTexture(tex, false);
|
||||||
|
args.uniforms.color = 0;
|
||||||
uniforms.flags |= TriUniforms::simple_shade;
|
uniforms.flags |= TriUniforms::simple_shade;
|
||||||
PolyTriangleDrawer::draw(args, TriDrawVariant::DrawSubsector, TriBlendMode::Shaded);
|
PolyTriangleDrawer::draw(args, TriDrawVariant::DrawSubsector, TriBlendMode::Shaded);
|
||||||
}
|
}
|
||||||
|
@ -227,6 +228,7 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, AActor *thing, subse
|
||||||
args.uniforms.destalpha = 256;
|
args.uniforms.destalpha = 256;
|
||||||
args.uniforms.srcalpha = (uint32_t)(thing->Alpha * 256);
|
args.uniforms.srcalpha = (uint32_t)(thing->Alpha * 256);
|
||||||
args.SetTexture(tex, false);
|
args.SetTexture(tex, false);
|
||||||
|
args.uniforms.color = 0;
|
||||||
uniforms.flags |= TriUniforms::simple_shade;
|
uniforms.flags |= TriUniforms::simple_shade;
|
||||||
PolyTriangleDrawer::draw(args, TriDrawVariant::DrawSubsector, TriBlendMode::Shaded);
|
PolyTriangleDrawer::draw(args, TriDrawVariant::DrawSubsector, TriBlendMode::Shaded);
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,7 +199,12 @@ void RenderPolyWall::Render(const TriMatrix &worldToClip)
|
||||||
}
|
}
|
||||||
else
|
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);
|
RenderPolyDecal::RenderWallDecals(worldToClip, Line, SubsectorDepth);
|
||||||
|
|
Loading…
Reference in a new issue