[gd_resource type="VisualShader" load_steps=43 format=3 uid="uid://c75j6c1ufl7b4"] [sub_resource type="VisualShaderNodeVectorLen" id="VisualShaderNodeVectorLen_r3r66"] linked_parent_graph_frame = 29 [sub_resource type="VisualShaderNodeCompare" id="VisualShaderNodeCompare_t0y3e"] default_input_values = [0, 0.0, 1, 0.0, 2, 0.1] linked_parent_graph_frame = 30 function = 1 [sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_lu2vr"] linked_parent_graph_frame = 29 source = 5 [sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_mk3a1"] default_input_values = [0, Vector2(0, 0), 1, Vector2(-0.01, -0.01)] linked_parent_graph_frame = 29 op_type = 0 [sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_2wq3p"] default_input_values = [0, Vector2(0, 0), 1, Vector2(0.01, 0.01)] linked_parent_graph_frame = 29 op_type = 0 [sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_8fn1m"] linked_parent_graph_frame = 29 source = 5 [sub_resource type="VisualShaderNodeVectorLen" id="VisualShaderNodeVectorLen_05w32"] linked_parent_graph_frame = 29 [sub_resource type="VisualShaderNodeVectorLen" id="VisualShaderNodeVectorLen_nc6ij"] linked_parent_graph_frame = 29 [sub_resource type="VisualShaderNodeCompare" id="VisualShaderNodeCompare_hy22l"] default_input_values = [0, 0.0, 1, 0.0, 2, 0.1] linked_parent_graph_frame = 30 function = 1 [sub_resource type="VisualShaderNodeCompare" id="VisualShaderNodeCompare_hlq0u"] default_input_values = [0, 0.0, 1, 0.0, 2, 0.1] linked_parent_graph_frame = 30 function = 1 [sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_mix4j"] linked_parent_graph_frame = 29 source = 5 [sub_resource type="VisualShaderNodeIntOp" id="VisualShaderNodeIntOp_3s2uv"] linked_parent_graph_frame = 30 operator = 8 [sub_resource type="VisualShaderNodeIntOp" id="VisualShaderNodeIntOp_ae8n7"] linked_parent_graph_frame = 30 operator = 8 [sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_t1nb0"] default_input_values = [0, Vector2(0, 0), 1, Vector2(-1, -1)] linked_parent_graph_frame = 28 op_type = 0 operator = 2 [sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_185dm"] default_input_values = [0, Vector2(0, 0), 1, Vector2(1, -1)] linked_parent_graph_frame = 28 op_type = 0 operator = 2 [sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_l7mnu"] default_input_values = [0, Vector2(0, 0), 1, Vector2(-1, 1)] linked_parent_graph_frame = 28 op_type = 0 operator = 2 [sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_3uhyx"] default_input_values = [0, Vector2(0, 0), 1, Vector2(1, 1)] linked_parent_graph_frame = 28 op_type = 0 operator = 2 [sub_resource type="VisualShaderNodeFloatParameter" id="VisualShaderNodeFloatParameter_rdr7q"] linked_parent_graph_frame = 28 parameter_name = "FloatParameter" default_value_enabled = true default_value = 0.01 [sub_resource type="VisualShaderNodeFrame" id="VisualShaderNodeFrame_yrp0y"] size = Vector2(1156, 1600) title = "Sampling Offsets" attached_nodes = PackedInt32Array(27, 26, 25, 24, 23) [sub_resource type="VisualShaderNodeFrame" id="VisualShaderNodeFrame_61nhp"] size = Vector2(1916, 1694) title = "Sample from offsets and get color intensity" attached_nodes = PackedInt32Array(5, 14, 13, 6, 16, 10, 17, 15, 12, 4, 9, 7, 2) [sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_hvmqq"] parameter_name = "Texture2DParameter" [sub_resource type="VisualShaderNodeFrame" id="VisualShaderNodeFrame_xmoqm"] size = Vector2(878, 1441) title = "Check if any intensities differ" attached_nodes = PackedInt32Array(11, 21, 18, 20, 19) [sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_esfp0"] linked_parent_graph_frame = 37 parameter_name = "ColorParameter" default_value_enabled = true [sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_63b32"] linked_parent_graph_frame = 38 parameter_name = "ColorParameter2" default_value_enabled = true default_value = Color(0, 0, 1, 1) [sub_resource type="VisualShaderNodeMultiplyAdd" id="VisualShaderNodeMultiplyAdd_rbrv8"] default_input_values = [0, 0.0, 1, -1.0, 2, 1.0] linked_parent_graph_frame = 38 [sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_rkfc2"] default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(0, 0, 0, 0)] linked_parent_graph_frame = 37 op_type = 2 operator = 2 [sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_b0r7r"] default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(0, 0, 0, 0)] linked_parent_graph_frame = 38 op_type = 2 operator = 2 [sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_tbe10"] default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(0, 0, 0, 0)] linked_parent_graph_frame = 45 op_type = 2 [sub_resource type="VisualShaderNodeFrame" id="VisualShaderNodeFrame_t6j1g"] size = Vector2(1136, 556) title = "Edge color output" attached_nodes = PackedInt32Array(31, 34) [sub_resource type="VisualShaderNodeFrame" id="VisualShaderNodeFrame_bxnhk"] size = Vector2(956, 916) title = "Background color output" attached_nodes = PackedInt32Array(35, 33, 32) [sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_f6yn7"] linked_parent_graph_frame = 44 source = 5 [sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_2qliw"] linked_parent_graph_frame = 29 input_name = "uv" [sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_hqpg5"] linked_parent_graph_frame = 44 parameter_name = "Texture2DParameter2" [sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_p8j37"] linked_parent_graph_frame = 44 operator = 2 [sub_resource type="VisualShaderNodeVectorDecompose" id="VisualShaderNodeVectorDecompose_gui18"] default_input_values = [0, Quaternion(0, 0, 0, 0)] linked_parent_graph_frame = 45 op_type = 2 [sub_resource type="VisualShaderNodeVectorCompose" id="VisualShaderNodeVectorCompose_palew"] linked_parent_graph_frame = 45 [sub_resource type="VisualShaderNodeFrame" id="VisualShaderNodeFrame_1hysk"] size = Vector2(1536, 824) title = "Noise for edges" attached_nodes = PackedInt32Array(40, 41, 39) [sub_resource type="VisualShaderNodeFrame" id="VisualShaderNodeFrame_7p8nt"] size = Vector2(1436, 820) title = "Add up background and the \"drawn edges\"" attached_nodes = PackedInt32Array(36, 43, 42) [sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_mhip3"] default_input_values = [0, Vector2(0, 0), 1, Vector2(0.01, -0.01)] linked_parent_graph_frame = 29 op_type = 0 [sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_mg4pv"] default_input_values = [0, Vector2(0, 0), 1, Vector2(-0.01, 0.01)] linked_parent_graph_frame = 29 op_type = 0 [sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_holuj"] linked_parent_graph_frame = 29 source = 5 [sub_resource type="VisualShaderNodeVectorLen" id="VisualShaderNodeVectorLen_7cfx6"] linked_parent_graph_frame = 29 [resource] code = "shader_type spatial; render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx; uniform float FloatParameter = 0.00999999977648; uniform sampler2D Texture2DParameter; uniform vec4 ColorParameter2 : source_color = vec4(0.000000, 0.000000, 1.000000, 1.000000); uniform sampler2D Texture2DParameter2; uniform vec4 ColorParameter : source_color = vec4(1.000000, 1.000000, 1.000000, 1.000000); void fragment() { // Input:4 vec2 n_out4p0 = UV; // FloatParameter:27 float n_out27p0 = FloatParameter; // VectorOp:23 vec2 n_in23p1 = vec2(-1.00000, -1.00000); vec2 n_out23p0 = vec2(n_out27p0) * n_in23p1; // VectorOp:5 vec2 n_out5p0 = n_out4p0 + n_out23p0; vec4 n_out2p0; // Texture2D:2 n_out2p0 = texture(Texture2DParameter, n_out5p0); // VectorLen:9 float n_out9p0 = length(vec3(n_out2p0.xyz)); // VectorOp:24 vec2 n_in24p1 = vec2(1.00000, -1.00000); vec2 n_out24p0 = vec2(n_out27p0) * n_in24p1; // VectorOp:6 vec2 n_out6p0 = n_out4p0 + n_out24p0; vec4 n_out7p0; // Texture2D:7 n_out7p0 = texture(Texture2DParameter, n_out6p0); // VectorLen:10 float n_out10p0 = length(vec3(n_out7p0.xyz)); // Compare:11 float n_in11p2 = 0.10000; bool n_out11p0 = !(abs(n_out9p0 - n_out10p0) < n_in11p2); // VectorOp:25 vec2 n_in25p1 = vec2(-1.00000, 1.00000); vec2 n_out25p0 = vec2(n_out27p0) * n_in25p1; // VectorOp:13 vec2 n_out13p0 = n_out4p0 + n_out25p0; vec4 n_out12p0; // Texture2D:12 n_out12p0 = texture(Texture2DParameter, n_out13p0); // VectorLen:16 float n_out16p0 = length(vec3(n_out12p0.xyz)); // Compare:19 float n_in19p2 = 0.10000; bool n_out19p0 = !(abs(n_out10p0 - n_out16p0) < n_in19p2); // IntOp:20 int n_out20p0 = (n_out11p0 ? 1 : 0) | (n_out19p0 ? 1 : 0); // VectorOp:26 vec2 n_in26p1 = vec2(1.00000, 1.00000); vec2 n_out26p0 = vec2(n_out27p0) * n_in26p1; // VectorOp:14 vec2 n_out14p0 = n_out4p0 + n_out26p0; vec4 n_out15p0; // Texture2D:15 n_out15p0 = texture(Texture2DParameter, n_out14p0); // VectorLen:17 float n_out17p0 = length(vec3(n_out15p0.xyz)); // Compare:18 float n_in18p2 = 0.10000; bool n_out18p0 = !(abs(n_out16p0 - n_out17p0) < n_in18p2); // IntOp:21 int n_out21p0 = n_out20p0 | (n_out18p0 ? 1 : 0); // MultiplyAdd:33 float n_in33p1 = -1.00000; float n_in33p2 = 1.00000; float n_out33p0 = fma(float(n_out21p0), n_in33p1, n_in33p2); // ColorParameter:32 vec4 n_out32p0 = ColorParameter2; // VectorOp:35 vec4 n_out35p0 = vec4(n_out33p0) * n_out32p0; vec4 n_out39p0; // Texture2D:39 n_out39p0 = texture(Texture2DParameter2, UV); // FloatOp:41 float n_out41p0 = float(n_out21p0) * n_out39p0.x; // ColorParameter:31 vec4 n_out31p0 = ColorParameter; // VectorOp:34 vec4 n_out34p0 = vec4(n_out41p0) * n_out31p0; // VectorOp:36 vec4 n_out36p0 = n_out35p0 + n_out34p0; // VectorDecompose:42 float n_out42p0 = n_out36p0.x; float n_out42p1 = n_out36p0.y; float n_out42p2 = n_out36p0.z; float n_out42p3 = n_out36p0.w; // VectorCompose:43 vec3 n_out43p0 = vec3(n_out42p0, n_out42p1, n_out42p2); // Output:0 ALBEDO = n_out43p0; ALPHA = n_out42p3; } " graph_offset = Vector2(-370.594, -29.2758) nodes/fragment/0/position = Vector2(6220, 920) nodes/fragment/2/node = SubResource("VisualShaderNodeTexture_mix4j") nodes/fragment/2/position = Vector2(-1000, 80) nodes/fragment/3/node = SubResource("VisualShaderNodeTexture2DParameter_hvmqq") nodes/fragment/3/position = Vector2(-3460, -80) nodes/fragment/4/node = SubResource("VisualShaderNodeInput_2qliw") nodes/fragment/4/position = Vector2(-2060, 140) nodes/fragment/5/node = SubResource("VisualShaderNodeVectorOp_mhip3") nodes/fragment/5/position = Vector2(-1380, 20) nodes/fragment/6/node = SubResource("VisualShaderNodeVectorOp_mg4pv") nodes/fragment/6/position = Vector2(-1380, 420) nodes/fragment/7/node = SubResource("VisualShaderNodeTexture_holuj") nodes/fragment/7/position = Vector2(-1000, 480) nodes/fragment/9/node = SubResource("VisualShaderNodeVectorLen_7cfx6") nodes/fragment/9/position = Vector2(-580, 180) nodes/fragment/10/node = SubResource("VisualShaderNodeVectorLen_r3r66") nodes/fragment/10/position = Vector2(-580, 440) nodes/fragment/11/node = SubResource("VisualShaderNodeCompare_t0y3e") nodes/fragment/11/position = Vector2(100, 80) nodes/fragment/12/node = SubResource("VisualShaderNodeTexture_lu2vr") nodes/fragment/12/position = Vector2(-1000, 860) nodes/fragment/13/node = SubResource("VisualShaderNodeVectorOp_mk3a1") nodes/fragment/13/position = Vector2(-1380, 800) nodes/fragment/14/node = SubResource("VisualShaderNodeVectorOp_2wq3p") nodes/fragment/14/position = Vector2(-1380, 1200) nodes/fragment/15/node = SubResource("VisualShaderNodeTexture_8fn1m") nodes/fragment/15/position = Vector2(-1000, 1260) nodes/fragment/16/node = SubResource("VisualShaderNodeVectorLen_05w32") nodes/fragment/16/position = Vector2(-560, 720) nodes/fragment/17/node = SubResource("VisualShaderNodeVectorLen_nc6ij") nodes/fragment/17/position = Vector2(-560, 980) nodes/fragment/18/node = SubResource("VisualShaderNodeCompare_hy22l") nodes/fragment/18/position = Vector2(100, 1000) nodes/fragment/19/node = SubResource("VisualShaderNodeCompare_hlq0u") nodes/fragment/19/position = Vector2(120, 540) nodes/fragment/20/node = SubResource("VisualShaderNodeIntOp_3s2uv") nodes/fragment/20/position = Vector2(540, 360) nodes/fragment/21/node = SubResource("VisualShaderNodeIntOp_ae8n7") nodes/fragment/21/position = Vector2(560, 740) nodes/fragment/23/node = SubResource("VisualShaderNodeVectorOp_t1nb0") nodes/fragment/23/position = Vector2(-2840, 840) nodes/fragment/24/node = SubResource("VisualShaderNodeVectorOp_185dm") nodes/fragment/24/position = Vector2(-2840, 1220) nodes/fragment/25/node = SubResource("VisualShaderNodeVectorOp_l7mnu") nodes/fragment/25/position = Vector2(-2840, 1600) nodes/fragment/26/node = SubResource("VisualShaderNodeVectorOp_3uhyx") nodes/fragment/26/position = Vector2(-2840, 1980) nodes/fragment/27/node = SubResource("VisualShaderNodeFloatParameter_rdr7q") nodes/fragment/27/position = Vector2(-3580, 960) nodes/fragment/28/node = SubResource("VisualShaderNodeFrame_yrp0y") nodes/fragment/28/position = Vector2(-3620, 760) nodes/fragment/29/node = SubResource("VisualShaderNodeFrame_61nhp") nodes/fragment/29/position = Vector2(-2100, -60) nodes/fragment/30/node = SubResource("VisualShaderNodeFrame_xmoqm") nodes/fragment/30/position = Vector2(60, 5) nodes/fragment/31/node = SubResource("VisualShaderNodeColorParameter_esfp0") nodes/fragment/31/position = Vector2(2980, 1260) nodes/fragment/32/node = SubResource("VisualShaderNodeColorParameter_63b32") nodes/fragment/32/position = Vector2(1940, 240) nodes/fragment/33/node = SubResource("VisualShaderNodeMultiplyAdd_rbrv8") nodes/fragment/33/position = Vector2(1960, -160) nodes/fragment/34/node = SubResource("VisualShaderNodeVectorOp_rkfc2") nodes/fragment/34/position = Vector2(3700, 1220) nodes/fragment/35/node = SubResource("VisualShaderNodeVectorOp_b0r7r") nodes/fragment/35/position = Vector2(2480, 40) nodes/fragment/36/node = SubResource("VisualShaderNodeVectorOp_tbe10") nodes/fragment/36/position = Vector2(4440, 1020) nodes/fragment/37/node = SubResource("VisualShaderNodeFrame_t6j1g") nodes/fragment/37/position = Vector2(2940, 1140) nodes/fragment/38/node = SubResource("VisualShaderNodeFrame_bxnhk") nodes/fragment/38/position = Vector2(1900, -240) nodes/fragment/39/node = SubResource("VisualShaderNodeTexture_f6yn7") nodes/fragment/39/position = Vector2(1740, 1220) nodes/fragment/40/node = SubResource("VisualShaderNodeTexture2DParameter_hqpg5") nodes/fragment/40/position = Vector2(1100, 1120) nodes/fragment/41/node = SubResource("VisualShaderNodeFloatOp_p8j37") nodes/fragment/41/position = Vector2(2220, 1020) nodes/fragment/42/node = SubResource("VisualShaderNodeVectorDecompose_gui18") nodes/fragment/42/position = Vector2(4980, 900) nodes/fragment/43/node = SubResource("VisualShaderNodeVectorCompose_palew") nodes/fragment/43/position = Vector2(5460, 660) nodes/fragment/44/node = SubResource("VisualShaderNodeFrame_1hysk") nodes/fragment/44/position = Vector2(1060, 945) nodes/fragment/45/node = SubResource("VisualShaderNodeFrame_7p8nt") nodes/fragment/45/position = Vector2(4400, 580) nodes/fragment/connections = PackedInt32Array(3, 0, 2, 2, 4, 0, 5, 0, 5, 0, 2, 0, 6, 0, 7, 0, 4, 0, 6, 0, 3, 0, 7, 2, 2, 0, 9, 0, 7, 0, 10, 0, 9, 0, 11, 0, 10, 0, 11, 1, 13, 0, 12, 0, 14, 0, 15, 0, 4, 0, 13, 0, 4, 0, 14, 0, 3, 0, 12, 2, 3, 0, 15, 2, 12, 0, 16, 0, 15, 0, 17, 0, 16, 0, 18, 0, 17, 0, 18, 1, 10, 0, 19, 0, 16, 0, 19, 1, 11, 0, 20, 0, 19, 0, 20, 1, 20, 0, 21, 0, 18, 0, 21, 1, 23, 0, 5, 1, 24, 0, 6, 1, 25, 0, 13, 1, 26, 0, 14, 1, 27, 0, 23, 0, 27, 0, 24, 0, 27, 0, 25, 0, 27, 0, 26, 0, 33, 0, 35, 0, 32, 0, 35, 1, 31, 0, 34, 1, 35, 0, 36, 0, 34, 0, 36, 1, 40, 0, 39, 2, 39, 0, 41, 1, 21, 0, 41, 0, 41, 0, 34, 0, 36, 0, 42, 0, 42, 0, 43, 0, 42, 1, 43, 1, 42, 2, 43, 2, 43, 0, 0, 0, 42, 3, 0, 1, 21, 0, 33, 0)