Fix transparent text shadow rendering
This commit is contained in:
parent
1f0854fff6
commit
91fcdfcb29
1 changed files with 3 additions and 2 deletions
|
|
@ -286,9 +286,10 @@ namespace psemek::ui
|
||||||
for (auto const & batch : cached_state_->batches)
|
for (auto const & batch : cached_state_->batches)
|
||||||
{
|
{
|
||||||
if (!batch.text) continue;
|
if (!batch.text) continue;
|
||||||
if (batch.color[3] < 255) continue;
|
auto color = *st->shadow_color;
|
||||||
|
color[3] = (color[3] * 1.f * batch.color[3]) / 255.f;
|
||||||
for (auto const & image : batch.images)
|
for (auto const & image : batch.images)
|
||||||
p.draw_image(image.position + offset, gfx::texture_view_2d{batch.texture, image.texcoords}, {*st->shadow_color, painter::color_mode::multiply});
|
p.draw_image(image.position + offset, gfx::texture_view_2d{batch.texture, image.texcoords}, {color, painter::color_mode::multiply});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue