Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixels under 128(0.5) transparency aren't culled/removed #125

Open
Pirate-Rob opened this issue Oct 6, 2021 · 1 comment
Open

Pixels under 128(0.5) transparency aren't culled/removed #125

Pirate-Rob opened this issue Oct 6, 2021 · 1 comment
Labels
bug Something isn't working render2d New rendering code issue

Comments

@Pirate-Rob
Copy link

In regular kag, images drawn with sprites have transparent pixels under a certain threshold have those pixels become fully transparent. Above a certain threshold they become opaque if I recall correctly.
Human_Male

This sort of sprite has 4 transparent pixels that are used as markers to attach limbs, however in game these marker pixels become visible:

@asumagic asumagic added bug Something isn't working render2d New rendering code issue labels Oct 11, 2021
@asumagic
Copy link
Owner

The issue is that following the render2d changes (understand: the internal name for a new unified and batched renderer in staging) the default RenderStyle now performs alpha blending.
... Because in vanilla for sprites it's "good enough" to not care too much about ordering when dealing with this blend mode, it indeed looks like the pixels are being blended against a black background (because they are).

There is an internal render2d blend mode that behaves the same as the vanilla KAG renderer, but it is currently not exposed.
The better option would be to make the default render style the same as before and instead expose a new RenderStyle that performs alpha blending, then change some scripts to use it (OTOH: speech bubbles).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working render2d New rendering code issue
Projects
None yet
Development

No branches or pull requests

2 participants