Multiply blending mode? Is it possible to do with a shader?

Hi there!

Was wondering whether it’s possible to create a multiply blending mode using a shader in Unity?

We really like a logo concept our designer has come up with (see video). We were going to animate it in Unity using RageSpline but need some way to replicate the multiply.

Any ideas/suggestions would be greatly appreciated!

https://vimeo.com/50974245

I cannot watch the video. For a “multiply blending mode” you can either use

Blend DstColor Zero

or

Blend Zero SrcColor

See Unity - Manual: ShaderLab command: Blend

Thanks Martin!

I’ll pass that on to our developer. Oh, and I’ve set the video to public now!

I just had a look at the video: there is more going on than a simple multiply, e.g. red on red results in black, and you might want some red component in the bright blue but still have the effect of red on bright blue resulting in black.

For such effects, you might have to use the alpha channel. For example, if you clear to RGBA=(0,0,0,0) and render the first objects with RGBA=(1,0,0,1) without blending and then for the 2nd object you use RGBA=(r,g,b,1) and the blending

Blend OneMinusDstAlpha Zero

then the resulting color should be black if you render at any point where the first object has been rendered but r,g,b where you haven’t rendered the first object.

Actually, this is interesting because if you avoid writing to the alpha channel and have a second pass using “Blend DstAlpha Zero” you can use any color for the intersection of the two objects, which is probably what you really want from an artistic point of view. (Ed McKnight Kauffer often used a color in overlapping regions that couldn’t be computed from the original two colors with any traditional blend mode, e.g. http://www.aiga.org/uploadedImages/AIGA/Content/Inspiration/aiga_medalist/MD_KaufferEM_Flight_640.jpg )

Nice! Love that image.

And yeah, totally, if we could have custom control over the overlap colour that would be absolutely awesome.

Thanks again for your help!!