Is there any way to draw a dynamic sprite in a different blending mode? Like screen or multiply? Or is there at least a function to change color values per pixel when drawing sprites, so I could do the calculations myself?
There's AGSBlend that offers that, not sure how much it resembles the photoshop effect. I haven't tested it, but go ahead and tell us if it actually works.
yea, AGSBlend can draw onto sprites in different blending modes with some caveats (must be 32-bit sprites for instance)
AGSBlend also provides GetAlpha and PutAlpha which allows you to alter the alpha channel of an image like GetPixel and PutPixel lets you change the other three channels.
It's not super quick though.. remember this is allegro and so everything is all DirectDraw compatible.
I have written a plugin that actually uses Direct 3D 9 that achieves the same effect. It runs extremely fast (I tested like 6-8 layers of "add" layers at 1024x768 and it didn't not slow down at all) but it forces your players to use the D3D9 driver instead of Direct Draw (which means they have to have a graphics card that supports pixel shaders). Also, your layers have to be power of two-sized (ie. 512x512 or 1024x1024 for example), but they will be stretched across your room properly of course. The plugin will be used in Fountain of Youth and it is still being tested, might be released pretty soon though depending on how much time I get and how many people are interested. Oh yeah, it currently only supports the Photoshop blend mode "add", too, not quite sure if the others are possible in D3D9.
Count me as one person interested in that plugin :)
First of all, thanks for the help - fall I'm not sure if this is what I need.
I was trying to write an anaglyph module for AGS.
The idea is drawing the screen twice simultaneously by having a doublesize background. And then blending screen 1 and two via additive blending by drawing a dynamic sprite.