Color key ignore alpha
Color key ignore alpha
I am color keying textures in my tilemap editor. I have a texture that has a transparent background ( rgba value of (0,0,0,0) ). But Some of the tiles use solid black ( rgba value of (0,0,0,255) ). When I try to color key with color value of 0 it also color keys the black values with alpha 255. Is it possible to color key with the alpha values or does it only use RGB?
Re: Color key ignore alpha
If you talk about makeColorKeyTexture - it ignores alpha's. Guess easiest solution is to copy the function (CNullDriver::makeColorKeyTexture) and then replace the if checks with refZeroAlpha by checks against the exact colors (for ECF_A1R5G5B5 you still have to convert color first I think).
edit: I've updated the documentation
edit: I've updated the documentation
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Color key ignore alpha
Thanks. I decided to just modify the tile sheet to remove all solid black from it. In Aseprite, there is an option called "Replace Color" that allows you to replace all instances of a color with a different color. I just made increased all the solid black with RGB(5,5,5). It worked like a charm.