Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Fix texture transparency issue #36

Closed
define-private-public opened this issue Sep 9, 2017 · 0 comments · Fixed by #37
Closed

Fix texture transparency issue #36

define-private-public opened this issue Sep 9, 2017 · 0 comments · Fixed by #37

Comments

@define-private-public
Copy link
Collaborator

This was originally reported in #13, but it's better to have a separate ticket to track this since it's a little bit of a problem.


Sprite transparency seems to not be working. If you check the sheet for BlauGest it should be transparent in the background. Transparency is being turned into black pixels. Sample pic included of what's happening now; some of the text is getting obstructed by the whole sprite frame:

bad-blending

For testing this, I think it would be a good idea to to include an example that draws a PNG image w/ alpha values between [0, 255], (unline GIF with only has 1 bit alpha). Make the background also transition/interpolate between two colours.

define-private-public added a commit to define-private-public/zengine that referenced this issue Sep 10, 2017
I discovered that when a PNG is loaded, it was triggering the case at line no. 448, which wasn't making an RGBA texture in OpenGL.

I also included some minor changes so we are hard-specifying the bit depth of each channel.  I'd also thing it would be a good idea to only use one type of texture (only make RGBA textures) but that's for another later discussion.

Also, the case states for lines 446-452 and 454-460 are kind of moot now, since they all resolve to the same proc call I collapsed it into an if statement.

Closes zacharycarter#36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant