Alpha Male
BlitzMax Forums/BlitzMax Beginners Area/Alpha Male
| ||
If any of you have experimented with trying to read ALPHA off of a screen, you may have run into some difficulties. Here is my attempt at it. Notice the first text that appears, and compare that w the last. You will definitely see a difference. My question is, what code can be changed in this to make this work properly so the first text that appears also appears perfectly in the last ? |
| ||
I tried the same on monkey target. A better idea is to guess the (former) alpha value from difference between set color and resulting color. f.e. If you draw a white (255,255,255) font on a black screen then the resulting grey values are the alpha informations for your image. The three colors still remain 255. |
| ||
I software render the glyphs on an image/pixmap - so I could preserve alpha. Just remember: Each TImageFont has an "glyph-image" stored for each character. If you need some hints for implementation: https://github.com/GWRon/Dig/blob/master/base.gfx.bitmapfont.bmx Of course this does not add "alpha-channel-backbuffers". For this you better use Render2Texture (there is code around in the forums, as you indirectly asked for this some weeks ago)... bye Ron |
| ||
I solved this without having to go through all that. My code of 6-lines versus the 880 you presented nor need of Render2Texture. :) Appreciate the help tho Midimaster and Ron. |