0 votes

Hello,

I asked this once for Godot 2.1
https://godotengine.org/qa/11867/achieve-multiply-blending-with-alpha-channel-transparency?show=11867

Now in Godot 3.0 there is no more blend mode option under CanvasItem.

How can I achieve a multiply blending mode with alpha channel in Godot 3.0?

edit: I tried adding a material with a shader using just this as the shader source:

shader_type canvas_item;
render_mode blend_mul;

It seems to work ... is this the correct way to do it?

in Engine by (259 points)
edited by

1 Answer

+4 votes
Best answer

You can create a new CanvasItemMaterial resource as the Material property of any node inheriting from CanvasItem (such as Sprite and Control). In that resource, you can set a blend mode such as mix (the default), addition, substraction, multiplication and pre-multiplied alpha.

Multiplication blending example

by (12,653 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.