mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
- fixed alpha for hardware rendered weapon sprites in the software renderer.
This commit is contained in:
parent
a40d85fd41
commit
e6ce429ca5
2 changed files with 5 additions and 9 deletions
|
@ -218,10 +218,8 @@ void RenderPolyPlayerSprites::RenderSprite(PolyRenderThread *thread, DPSprite *p
|
|||
const auto &viewwindow = PolyRenderer::Instance()->Viewwindow;
|
||||
DCanvas *renderTarget = PolyRenderer::Instance()->RenderTarget;
|
||||
|
||||
// Force it to use software rendering.
|
||||
// To do: Fix that Draw2D() is never called by SWSceneDrawer::RenderView. Make sure to adjust the similar comment in r_playersprite.cpp
|
||||
bool renderToCanvas = true;
|
||||
//bool renderToCanvas = PolyRenderer::Instance()->RenderToCanvas;
|
||||
// Force it to use software rendering when drawing to a canvas texture.
|
||||
bool renderToCanvas = PolyRenderer::Instance()->RenderToCanvas;
|
||||
|
||||
sprframe = &SpriteFrames[sprdef->spriteframes + pspr->GetFrame()];
|
||||
|
||||
|
|
|
@ -289,10 +289,8 @@ namespace swrenderer
|
|||
|
||||
vis.texturemid = (BASEYCENTER - sy) * tex->Scale.Y + tex->GetTopOffset(0);
|
||||
|
||||
// Force it to use software rendering.
|
||||
// To do: Fix that Draw2D() is never called by SWSceneDrawer::RenderView. Also make sure to adjust the similar comment in poly_playersprite.cpp
|
||||
bool renderToCanvas = true;
|
||||
//bool renderToCanvas = viewport->RenderingToCanvas;
|
||||
// Force it to use software rendering when drawing to a canvas texture.
|
||||
bool renderToCanvas = viewport->RenderingToCanvas;
|
||||
|
||||
if (Thread->Viewport->viewpoint.camera->player && (renderToCanvas ||
|
||||
viewheight == viewport->RenderTarget->GetHeight() ||
|
||||
|
@ -487,7 +485,7 @@ namespace swrenderer
|
|||
DTA_FillColor, sprite.FillColor,
|
||||
DTA_SpecialColormap, sprite.special,
|
||||
DTA_ColorOverlay, sprite.overlay.d,
|
||||
DTA_Color, sprite.LightColor,
|
||||
DTA_Color, sprite.LightColor | 0xff000000, // the color here does not have a valid alpha component.
|
||||
DTA_Desaturate, sprite.Desaturate,
|
||||
TAG_DONE);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue