I'm balls deep in a graphic tile-based level with several layers à la Photoshop, which I'm porting to 0.9.0. All drawable tile objects contain only black, white, and alpha.
I used to be able to "colorize" the black pixels of the current layer with a slight green using setColorMode. It was kind of awkward and I didn't understand it, but it worked.
I'm having trouble doing this in 0.9.0, now that setColorMode is gone. I thought an additive blend mode would be able to lighten dark pixels, but right now additive is only making the layer's images disappear. Also note that I only want to affect the current layer, not those below or above.
Any advice? I'd rather not use shaders just for this.
Colorizing black pixels
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Colorizing black pixels
Additive should work, but if you only want it applied to that layer, you might need to do some canvas magic.
Re: Colorizing black pixels
I could live with that, though it's too bad I'd have to introduce a hardware-dependent feature.
Still, it's curious I can't get additive to do anything right now. Exchanging "multiplicative" with "additive" in the wiki example code works, but not in my own app (which uses spritebatches rather than rectangle primitives).
Still, it's curious I can't get additive to do anything right now. Exchanging "multiplicative" with "additive" in the wiki example code works, but not in my own app (which uses spritebatches rather than rectangle primitives).
Who is online
Users browsing this forum: Google [Bot] and 3 guests