mod2x blend mode?

For overlays like bullet marks and details placed by the artist, it is good to have a blend mode whereby anything darker than (128,128,128) darkens the fragment, and anything brighter than (128,128,128) lightens it. The equation would be this:

color1 * color2 * 2

Though I am a huge OpenGL fan, this is one thing I must admit is nice about DirectX. Is there any way to perform this type of blending in OpenGL by using one of the blend extensions? I can duplicate the lighting of the underlying surface and draw it in the second pass, but it would be so much easier if a simple mod2x blend were available.

Isn’t that the same as:

color1 * color2 + color1 * color2

which would then be:



Yeah, I just found it:…=true#Post79745

Thanks, it seems to work.