From 47fa19c65f195072d2638f506efe6eec1e6621d4 Mon Sep 17 00:00:00 2001 From: RodZill4 Date: Tue, 29 Oct 2019 22:12:53 +0100 Subject: [PATCH] fix in convolution node (incorrect behavior near edges) --- addons/material_maker/engine/gen_convolution.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/material_maker/engine/gen_convolution.gd b/addons/material_maker/engine/gen_convolution.gd index 842d7fd..60c223f 100644 --- a/addons/material_maker/engine/gen_convolution.gd +++ b/addons/material_maker/engine/gen_convolution.gd @@ -141,7 +141,7 @@ func _get_shader_code(uv : String, output_index : int, context : MMGenContext) - var line = matrix[dy+convolution_params.y] for dx in range(-convolution_params.x, convolution_params.x+1): var coef = line[dx+convolution_params.x] - var uv_str = "fract((%s)+vec2(%.9f,%.9f))" % [ uv, dx*epsilon, dy*epsilon ] + var uv_str = "(%s)+vec2(%.9f,%.9f)" % [ uv, dx*epsilon, dy*epsilon ] var src_code = source.generator.get_shader_code(uv_str, source.output_index, context) while src_code is GDScriptFunctionState: src_code = yield(src_code, "completed")