BlendMode ColorDodge in OpenFL?

As of now, the PhotoShop-blendmode “ColorDodge” is not available in OpenFL.
Are there any plans to implement that?
Has anybody developed an unofficial/external solution for this?
How could I approach programming that Shader myself?

the closest blend mode to color dodge is linear dodge, which is the ADD blend mode.

Yes, so I’ve seen. But linear dodge actually has completely different results than color dodge.

(Color dodge divides the bottom layer by the inverted top layer - while linear dodge just sums both layers… the first one looks perfectly like lighting up dark rooms, while “linear” makes virtually no difference to normal in dark rooms)

I see. I’m not familiar with openfl next’s shader system, but I can write a shader to achieve the effect (assuming the effect you want is to have an image that lights up another image). Meanwhile you can try the Multiply blend mode with a dark image to darken your base image while keeping some part lit up.

That would be pretty cool actually. Yes, that’s the idea behind it.
It’s supposed to simulate the background-illumination from colored light sources on a 2d-background.
(Dark caves illuminated by a yellow/red/blue light source)…
And color dodge is really the perfect choice for it.

I’ll leave it out for this stage of dev…

Hmm, maybe try this: have a black or grey background image and some colored circles as lights on top using normal blend mode, then have your cave on top of all of them using multiply blend mode. the image of your caves and surroundings should be well lit.

That is actually a pretty good idea… I will definitely try that out. I’m gonna tell you the results (visually and performance-wise) once I got to it, thanks!

Performance wise this should have no problem. Also, let me know if you want to achieve this with a shader :smiley:

Alright, I tried this out, but with “multiply” in the cave-background-layer, it doesn’t pick up anything - everything is dark.

That is: Black background layer (normal) -> Light sources layer (Normal) -> Cave background layer (multiply)

I’ve tried this constellation out in Photoshop and the only blendmode that achieves a satisfying result is “Soft Light”, but of course, this one’s not supported by OpenFL as well.

Soft Light is a much more complicated version of Hard LIght (which is a combination of Screen and Multiply)…

Hmm… I believe I have tried Shaders in OpenFL a while back - how does it work at the moment and are the shaders performant?
And of COURSE - If you have fun programming a shader, please, be my guest, I’d be extremely delighted. Or if you can help me make my own shader. Because sooner or later, I’ll have to do this, because these ligthing effects play a very important role in the game we’re developing.

Thanks for your help in the first place. :slight_smile: