From 898ec5a387cc1ef695479412f914eb7c08400c50 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 24 Oct 2021 02:15:32 +0200 Subject: [PATCH] Small improvement for the blend node. It still doesn't handles transparency properly. --- game/addons/mat_maker_gd/nodes/filter/blend.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/addons/mat_maker_gd/nodes/filter/blend.gd b/game/addons/mat_maker_gd/nodes/filter/blend.gd index c09c84c5..ffeed8ae 100644 --- a/game/addons/mat_maker_gd/nodes/filter/blend.gd +++ b/game/addons/mat_maker_gd/nodes/filter/blend.gd @@ -84,7 +84,7 @@ func get_value_for(uv : Vector2, pseed : int) -> Color: #vec4 $(name_uv)_s2 = $s2($uv); var s2 : Color = input2.get_value(uv) #float $(name_uv)_a = $amount*$a($uv); - var a : float = opacity.get_default_value(uv) * opacity.get_value(uv) + var a : float = opacity.get_value(uv) #vec4(blend_$blend_type($uv, $(name_uv)_s1.rgb, $(name_uv)_s2.rgb, $(name_uv)_a*$(name_uv)_s1.a), min(1.0, $(name_uv)_s2.a+$(name_uv)_a*$(name_uv)_s1.a))