Post Reply 
PIXON_P Alpha blending
05-06-2017, 05:35 PM
Post: #1
PIXON_P Alpha blending
Hello,
I have a doubt on how the alpha blending algorithm works. Basically, I want to draw a black screen, and then I want to draw pixels so that the first time I draw a given pixel, it's just barely visible, then after drawing over it more and more, it gets more and more white.
But I noticed that if I do for example:
PIXON_P(X,Y,#F0FFFFFFh)
(which is a pure white pixel with an alpha channel of #F0h), I don't get what I expect. What I get is that after very few "overlaps" (around 10) the pixel stops getting brighter, and stays at a rather dark grey. If I modify the alpha value, to i.e. #F5h, the pixels still saturate after about 10 overlaps, but to a very dark grey instead.
I was expecting that, since I'm drawing a partially transparent pure white pixel, the "saturated" color would be pure white, and that it would take more or less overlaps to get there depending on the transparency level...
What am I doing wrong? How can I get the result I need? Ideally, I'd like to have the pixels get a (1,1,1) color after the first drawing, and get to (255,255,255) after n overlaps, with n variable but ideally 255...

Thank you,
Cristian
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
PIXON_P Alpha blending - Cristian Arezzini - 05-06-2017 05:35 PM
RE: PIXON_P Alpha blending - Carlos295pz - 05-07-2017, 11:22 AM
RE: PIXON_P Alpha blending - Han - 05-07-2017, 02:27 PM
RE: PIXON_P Alpha blending - webmasterpdx - 09-12-2017, 09:33 AM



User(s) browsing this thread: 1 Guest(s)