Added blend mode

Jimmy

Active Member
Tutorial Author
Joined
Jan 2, 2020
Hi I added a subtractive blend mode for anyone who wants it, just replace the graphics.cxs file inside your Cerberus folder with this one.

Here's an example how a shape would be painted using normal paint mode and the new subtractive mode.
Normal drawing versus subtractive
alpha.png
subtractive.png
 

Attachments

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Moved this thread from general.
 

Holzchopf

Moderator
3rd Party Module Dev
Joined
Jul 31, 2017
Location
Bern, Switzerland
Thanks. Interesting blend mode, I will check if this can find its way into the official Cerberus. I see you changed the blendfunc for Opaque2 in your code - any reason for that? Would a glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA) also be of interest?
 

Jimmy

Active Member
Tutorial Author
Joined
Jan 2, 2020
Good catch, Opaque2 was not meant to be changed at all.

This is the file you want to use.
 

Attachments

Jimmy

Active Member
Tutorial Author
Joined
Jan 2, 2020
This mode is meant for games like Worms or Lemmings, you erase mountains and levels and
you may use SetAlpha 0.5 for instance to erase something softly.

Being able to do this with full hardware acceleration is extremely practical :cool:
 
Last edited:
Top Bottom