Is there a way to simulate the "saturation" blending mode from Photoshop?

Hi all,

I’m not much of an OpenGL guy myself, so I would like to ask if anyone knows if it is possible to simulate the effect of the “saturation” blendMode which exists in Photoshop?

Photoshop describes it as: Creates a result color with the luminance and hue of the base color and the saturation of the blend color. Painting with this mode in an area with no (0) saturation (gray) causes no change.

I’m looking for a method either with a custom shader applied to the sprite, or by creating a custom blendMode (which I guess is not possible to such extend?)

Have you looked at saturation filter yet?

https://docs.coronalabs.com/guide/graphics/effects.html#filter.saturate

Rob

Yes I am aware of that filter, it does work slightly different than the “saturation” blendingMode though. The blendingMode would offer partial saturation and saturating specific channels. At first I did require this, but due to changed requirements the ‘filter.saturate’ will also work for me. :slight_smile:

You might be able to achieve what you are looking for with composite effects, however, composite filters don’t currently support sprite sheets.  Still, take a look.

You might also be able approximate some Photoshop-like saturations with these filters:

colorPolynomial

colorMatrix

monotone

all of which, I believe, should work with sprite sheets.

Well I have been able to achieve my desired effect with ‘filter.saturate’ since that filter has exactly the same result as a black or white overlay with the ‘saturation’ blendMode.

But now I have encountered some other blendModes which would also be very useful in my game. These are ‘Hard Light’, ‘Vivid Light’ ‘Color Dodge’ and ‘Color’. Since composite effect won’t do the the job, would it be possible to use custom defined shaders with the color it should blend with baked in? (since all I try to achieve is to let it blend with a specific color)

I think you can approximate most of those effects with filters.  They have different names but some of the effects are similar.  Also try using two identical objects with different filter effects stacked on top of one another - each at 0.5 alpha.  The background behind the two images can add additional effects so then you have even more variables to play with.

Try swapping the top and bottom images.  The bottom image can also be 1.0 alpha depending on the effect you want.  

Have you looked at saturation filter yet?

https://docs.coronalabs.com/guide/graphics/effects.html#filter.saturate

Rob

Yes I am aware of that filter, it does work slightly different than the “saturation” blendingMode though. The blendingMode would offer partial saturation and saturating specific channels. At first I did require this, but due to changed requirements the ‘filter.saturate’ will also work for me. :slight_smile:

You might be able to achieve what you are looking for with composite effects, however, composite filters don’t currently support sprite sheets.  Still, take a look.

You might also be able approximate some Photoshop-like saturations with these filters:

colorPolynomial

colorMatrix

monotone

all of which, I believe, should work with sprite sheets.

Well I have been able to achieve my desired effect with ‘filter.saturate’ since that filter has exactly the same result as a black or white overlay with the ‘saturation’ blendMode.

But now I have encountered some other blendModes which would also be very useful in my game. These are ‘Hard Light’, ‘Vivid Light’ ‘Color Dodge’ and ‘Color’. Since composite effect won’t do the the job, would it be possible to use custom defined shaders with the color it should blend with baked in? (since all I try to achieve is to let it blend with a specific color)

I think you can approximate most of those effects with filters.  They have different names but some of the effects are similar.  Also try using two identical objects with different filter effects stacked on top of one another - each at 0.5 alpha.  The background behind the two images can add additional effects so then you have even more variables to play with.

Try swapping the top and bottom images.  The bottom image can also be 1.0 alpha depending on the effect you want.