[gd_resource type="VisualShader" load_steps=28 format=3 uid="uid://c6okm2ay0fkjf"] [sub_resource type="VisualShaderNodeFloatOp" id="1"] output_port_for_preview = 0 default_input_values = [0, 0.0, 1, 0.1] operator = 3 [sub_resource type="VisualShaderNodeFloatParameter" id="2"] parameter_name = "width" [sub_resource type="VisualShaderNodeFloatOp" id="11"] output_port_for_preview = 0 default_input_values = [0, 1.0, 1, 0.0] operator = 1 [sub_resource type="VisualShaderNodeFloatOp" id="12"] output_port_for_preview = 0 operator = 1 [sub_resource type="VisualShaderNodeFloatParameter" id="13"] parameter_name = "fade" [sub_resource type="VisualShaderNodeFloatOp" id="14"] default_input_values = [0, 0.0, 1, 2.0] operator = 3 [sub_resource type="VisualShaderNodeVectorFunc" id="15"] output_port_for_preview = 0 [sub_resource type="VisualShaderNodeDotProduct" id="16"] default_input_values = [0, Vector3(0, 0, 0), 1, Vector3(0, -1, 0)] [sub_resource type="VisualShaderNodeVectorOp" id="17"] default_input_values = [0, Vector3(0, 0, 0), 1, Vector3(0, -1, 0)] operator = 8 [sub_resource type="VisualShaderNodeColorParameter" id="3"] parameter_name = "albedo" [sub_resource type="VisualShaderNodeVectorDecompose" id="18"] [sub_resource type="VisualShaderNodeIf" id="19"] [sub_resource type="VisualShaderNodeFloatOp" id="20"] default_input_values = [0, 6.28319, 1, 0.0] operator = 1 [sub_resource type="VisualShaderNodeFloatFunc" id="21"] output_port_for_preview = 0 function = 4 [sub_resource type="VisualShaderNodeFloatOp" id="22"] output_port_for_preview = 0 default_input_values = [0, 0.0, 1, 6.28319] operator = 3 [sub_resource type="VisualShaderNodeFloatParameter" id="23"] parameter_name = "value" [sub_resource type="VisualShaderNodeFloatOp" id="24"] output_port_for_preview = 0 operator = 1 [sub_resource type="VisualShaderNodeFloatOp" id="25"] output_port_for_preview = 0 operator = 3 [sub_resource type="VisualShaderNodeFloatOp" id="26"] output_port_for_preview = 0 operator = 6 [sub_resource type="VisualShaderNodeInput" id="4"] output_port_for_preview = 0 input_name = "uv" [sub_resource type="VisualShaderNodeFloatOp" id="27"] default_input_values = [0, 0.0, 1, 6.28319] operator = 3 [sub_resource type="VisualShaderNodeVectorOp" id="5"] output_port_for_preview = 0 default_input_values = [0, Vector3(0, 0, 0), 1, Vector3(2, 2, 0)] operator = 2 [sub_resource type="VisualShaderNodeVectorOp" id="6"] output_port_for_preview = 0 default_input_values = [0, Vector3(0, 0, 0), 1, Vector3(-1, -1, 0)] [sub_resource type="VisualShaderNodeVectorLen" id="7"] output_port_for_preview = 0 [sub_resource type="VisualShaderNodeFloatOp" id="8"] output_port_for_preview = 0 operator = 1 [sub_resource type="VisualShaderNodeFloatParameter" id="9"] parameter_name = "radius" [sub_resource type="VisualShaderNodeFloatFunc" id="10"] output_port_for_preview = 0 function = 12 [resource] code = "shader_type spatial; render_mode unshaded; uniform vec4 albedo : source_color; uniform float value; uniform float fade; uniform float radius; uniform float width; void fragment() { // ColorParameter:2 vec4 n_out2p0 = albedo; // Input:3 vec2 n_out3p0 = UV; // VectorOp:4 vec3 n_in4p1 = vec3(2.00000, 2.00000, 0.00000); vec3 n_out4p0 = vec3(n_out3p0, 0.0) * n_in4p1; // VectorOp:5 vec3 n_in5p1 = vec3(-1.00000, -1.00000, 0.00000); vec3 n_out5p0 = n_out4p0 + n_in5p1; // VectorFunc:17 vec3 n_out17p0 = normalize(n_out5p0); // VectorOp:19 vec3 n_in19p1 = vec3(0.00000, -1.00000, 0.00000); vec3 n_out19p0 = cross(n_out17p0, n_in19p1); // VectorDecompose:20 float n_out20p0 = n_out19p0.x; float n_out20p1 = n_out19p0.y; float n_out20p2 = n_out19p0.z; // DotProduct:18 vec3 n_in18p1 = vec3(0.00000, -1.00000, 0.00000); float n_out18p0 = dot(n_out17p0, n_in18p1); // FloatFunc:24 float n_out24p0 = acos(n_out18p0); // FloatOp:23 float n_in23p0 = 6.28319; float n_out23p0 = n_in23p0 - n_out24p0; vec3 n_out22p0; // If:22 float n_in22p1 = 0.00000; float n_in22p2 = 0.00001; if(abs(n_out20p2 - n_in22p1) < n_in22p2) { n_out22p0 = vec3(n_out24p0); } else if(n_out20p2 < n_in22p1) { n_out22p0 = vec3(n_out24p0); } else { n_out22p0 = vec3(n_out23p0); } // FloatOp:25 float n_in25p1 = 6.28319; float n_out25p0 = n_out22p0.x / n_in25p1; // FloatParameter:26 float n_out26p0 = value; // FloatOp:27 float n_out27p0 = n_out25p0 - n_out26p0; // FloatParameter:14 float n_out14p0 = fade; // FloatOp:30 float n_in30p1 = 6.28319; float n_out30p0 = n_out14p0 / n_in30p1; // FloatOp:28 float n_out28p0 = n_out27p0 / n_out30p0; // VectorLen:6 float n_out6p0 = length(n_out5p0); // FloatParameter:8 float n_out8p0 = radius; // FloatOp:7 float n_out7p0 = n_out6p0 - n_out8p0; // FloatFunc:9 float n_out9p0 = abs(n_out7p0); // FloatParameter:11 float n_out11p0 = width; // FloatOp:15 float n_in15p1 = 2.00000; float n_out15p0 = n_out11p0 / n_in15p1; // FloatOp:13 float n_out13p0 = n_out9p0 - n_out15p0; // FloatOp:10 float n_out10p0 = n_out13p0 / n_out14p0; // FloatOp:29 float n_out29p0 = max(n_out28p0, n_out10p0); // FloatOp:12 float n_in12p0 = 1.00000; float n_out12p0 = n_in12p0 - n_out29p0; // Output:0 ALBEDO = vec3(n_out2p0.xyz); ALPHA = n_out12p0; } " graph_offset = Vector2(652.664, 119.317) flags/unshaded = true nodes/fragment/0/position = Vector2(1800, -40) nodes/fragment/2/node = SubResource("3") nodes/fragment/2/position = Vector2(1480, -200) nodes/fragment/3/node = SubResource("4") nodes/fragment/3/position = Vector2(-220, 200) nodes/fragment/4/node = SubResource("5") nodes/fragment/4/position = Vector2(-20, 200) nodes/fragment/5/node = SubResource("6") nodes/fragment/5/position = Vector2(180, 200) nodes/fragment/6/node = SubResource("7") nodes/fragment/6/position = Vector2(380, 200) nodes/fragment/7/node = SubResource("8") nodes/fragment/7/position = Vector2(580, 200) nodes/fragment/8/node = SubResource("9") nodes/fragment/8/position = Vector2(260, 440) nodes/fragment/9/node = SubResource("10") nodes/fragment/9/position = Vector2(780, 200) nodes/fragment/10/node = SubResource("1") nodes/fragment/10/position = Vector2(1200, 200) nodes/fragment/11/node = SubResource("2") nodes/fragment/11/position = Vector2(260, 600) nodes/fragment/12/node = SubResource("11") nodes/fragment/12/position = Vector2(1600, 60) nodes/fragment/13/node = SubResource("12") nodes/fragment/13/position = Vector2(1000, 200) nodes/fragment/14/node = SubResource("13") nodes/fragment/14/position = Vector2(260, 780) nodes/fragment/15/node = SubResource("14") nodes/fragment/15/position = Vector2(560, 600) nodes/fragment/17/node = SubResource("15") nodes/fragment/17/position = Vector2(-380, -100) nodes/fragment/18/node = SubResource("16") nodes/fragment/18/position = Vector2(-120, -40) nodes/fragment/19/node = SubResource("17") nodes/fragment/19/position = Vector2(-120, -180) nodes/fragment/20/node = SubResource("18") nodes/fragment/20/position = Vector2(60, -180) nodes/fragment/22/node = SubResource("19") nodes/fragment/22/position = Vector2(620, -100) nodes/fragment/23/node = SubResource("20") nodes/fragment/23/position = Vector2(360, 40) nodes/fragment/24/node = SubResource("21") nodes/fragment/24/position = Vector2(60, -40) nodes/fragment/25/node = SubResource("22") nodes/fragment/25/position = Vector2(800, -100) nodes/fragment/26/node = SubResource("23") nodes/fragment/26/position = Vector2(660, -360) nodes/fragment/27/node = SubResource("24") nodes/fragment/27/position = Vector2(1000, -100) nodes/fragment/28/node = SubResource("25") nodes/fragment/28/position = Vector2(1200, -100) nodes/fragment/29/node = SubResource("26") nodes/fragment/29/position = Vector2(1400, 60) nodes/fragment/30/node = SubResource("27") nodes/fragment/30/position = Vector2(1000, -240) nodes/fragment/connections = PackedInt32Array(2, 0, 0, 0, 3, 0, 4, 0, 4, 0, 5, 0, 5, 0, 6, 0, 6, 0, 7, 0, 8, 0, 7, 1, 7, 0, 9, 0, 12, 0, 0, 1, 9, 0, 13, 0, 13, 0, 10, 0, 14, 0, 10, 1, 11, 0, 15, 0, 15, 0, 13, 1, 5, 0, 17, 0, 17, 0, 18, 0, 17, 0, 19, 0, 19, 0, 20, 0, 18, 0, 24, 0, 24, 0, 23, 1, 22, 0, 25, 0, 20, 2, 22, 0, 24, 0, 22, 3, 23, 0, 22, 4, 24, 0, 22, 5, 25, 0, 27, 0, 26, 0, 27, 1, 27, 0, 28, 0, 28, 0, 29, 0, 10, 0, 29, 1, 29, 0, 12, 1, 14, 0, 30, 0, 30, 0, 28, 1)