
Which means you can finish sprites quicker and you won't have to go through the tedious process of coloring it black.


Oh. I guess things with gfx in PGE are different than in smbx. Because in smbx it works fine.Wohlstand wrote:It's a lazily-made mask which invalid. If youbwill use alpha-blending unmask algorithm, result will be wrong.
Here I wrote about it /viewtopic.php?f=40&t=159
The true fastest way of mask creation is usage of png2gifs tool which includes with PGE. Now it have user-friendly drag&drop GUI, so:
- save your sprite in PNG format with transparency
- run png2gifs
- drag & drop your PNGs into gray box. In opened console box yoi can see conversion log.
Works because it is a bit-blit algorithm (Alpha-blending algorithm converts mask into alpha-channel and this way giving ability to use true semi-transparency). But even for it this way is not correct. If you don't know how it works, please don't make lazily-made GFXes.lighthouse64 wrote:Oh. I guess things with gfx in PGE are different than in smbx. Because in smbx it works fine.Wohlstand wrote:It's a lazily-made mask which invalid. If youbwill use alpha-blending unmask algorithm, result will be wrong.
Here I wrote about it /viewtopic.php?f=40&t=159
The true fastest way of mask creation is usage of png2gifs tool which includes with PGE. Now it have user-friendly drag&drop GUI, so:
- save your sprite in PNG format with transparency
- run png2gifs
- drag & drop your PNGs into gray box. In opened console box yoi can see conversion log.
ok. I guess this was no good than... :/Wohlstand wrote:Works because it is a bit-blit algorithm (Alpha-blending algorithm converts mask into alpha-channel and this way giving ability to use true semi-transparency). But even for it this way is not correct. If you don't know how it works, please don't make lazily-made GFXes.lighthouse64 wrote:Oh. I guess things with gfx in PGE are different than in smbx. Because in smbx it works fine.Wohlstand wrote:It's a lazily-made mask which invalid. If youbwill use alpha-blending unmask algorithm, result will be wrong.
Here I wrote about it /viewtopic.php?f=40&t=159
The true fastest way of mask creation is usage of png2gifs tool which includes with PGE. Now it have user-friendly drag&drop GUI, so:
- save your sprite in PNG format with transparency
- run png2gifs
- drag & drop your PNGs into gray box. In opened console box yoi can see conversion log.
BitBlit algorithm is slow because to draw image we making double fetching:
1) firstly we fetching mask image and draw each pixel on screen with AND bitwise operation to R G and B. Where black, pixel will take black color, where white on mask - background color will be same with no changes.
2) secondary we fetching image sprite and draw each pixel on the same place on screen, but with AND bitwise operation to R G and B. Where was black - pixel will be drawn over black with more light color. Where on image black pixel - is a leaving of background color without replacement
Alpha-blending algorithm mixing colors with using of special coefficient - alpha-channel which a level of opacity for this pixel. Alpha-blending giving you able to draw clear glass, water, ice, etc. with clear and beutiful result.
Users browsing this forum: 1 guest