[gd_resource type="VisualShader" load_steps=17 format=3 uid="uid://dsi0ofa74tfc4"]

[ext_resource type="Texture2D" uid="uid://bmor4v4j7krgh" path="res://Scenes/TowerBase/funboxtex.png" id="1_h83w8"]
[ext_resource type="Texture2D" uid="uid://c4ytjp05u7auv" path="res://noisetex.tres" id="2_pgkht"]

[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_ugjxq"]
source = 5
texture = ExtResource("1_h83w8")

[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_hqcdo"]
parameter_name = "Texture2DParameter"
qualifier = 2
texture_type = 1
texture_filter = 1

[sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_rwgpq"]
output_port_for_preview = 0
expanded_output_ports = [0]
parameter_name = "Color"
qualifier = 2
default_value_enabled = true
default_value = Color(0, 1, 0, 0.752941)

[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_g2jnk"]
output_port_for_preview = 0
default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(0, 0, 0, 0)]
op_type = 2
operator = 2

[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_ddxtc"]
default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(0, 0, 0, 0)]
expanded_output_ports = [0]
op_type = 2
operator = 2

[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_nxokf"]
output_port_for_preview = 0
input_name = "uv"

[sub_resource type="VisualShaderNodeVectorFunc" id="VisualShaderNodeVectorFunc_lymyr"]
output_port_for_preview = 0
default_input_values = [0, Quaternion(0, 0, 0, 0)]
op_type = 2
function = 32

[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_s08rr"]
output_port_for_preview = 4
default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(0, 0, 0, 0)]
expanded_output_ports = [0]
op_type = 2

[sub_resource type="VisualShaderNodeFloatParameter" id="VisualShaderNodeFloatParameter_8utgl"]
parameter_name = "Float"
qualifier = 2
default_value_enabled = true
default_value = 1.0

[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_pyn4g"]
function = 31

[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_pw0qj"]
default_input_values = [0, 0.0, 1, 0.5]
operator = 1

[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_4c6mr"]
output_port_for_preview = 0
texture = ExtResource("2_pgkht")

[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_v8kd6"]
output_port_for_preview = 0
operator = 1

[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_h0gpf"]
output_port_for_preview = 0
function = 15

[resource]
code = "shader_type spatial;
render_mode blend_mix, depth_draw_always, cull_back, diffuse_lambert, specular_schlick_ggx, depth_prepass_alpha;

uniform sampler2D Texture2DParameter : source_color, filter_nearest;
uniform sampler2D tex_frg_7;
instance uniform float Float = 1;
instance uniform vec4 Color : source_color = vec4(0.000000, 1.000000, 0.000000, 0.752941);



void fragment() {
	vec4 n_out13p0;
// Texture2D:13
	n_out13p0 = texture(Texture2DParameter, UV);


// Input:2
	vec2 n_out2p0 = UV;


// Texture2D:7
	vec4 n_out7p0 = texture(tex_frg_7, n_out2p0);


// FloatParameter:23
	float n_out23p0 = Float;


// FloatFunc:24
	float n_out24p0 = 1.0 - n_out23p0;


// FloatOp:5
	float n_in5p1 = 0.50000;
	float n_out5p0 = n_out24p0 - n_in5p1;


// FloatOp:8
	float n_out8p0 = n_out7p0.x - n_out5p0;


// FloatFunc:9
	float n_out9p0 = round(n_out8p0);


// VectorOp:18
	vec4 n_out18p0 = n_out13p0 * vec4(n_out9p0);


// VectorFunc:21
	vec4 n_out21p0 = vec4(1.0) - vec4(n_out9p0);


// ColorParameter:15
	vec4 n_out15p0 = Color;


// VectorOp:19
	vec4 n_out19p0 = n_out21p0 * n_out15p0;


// VectorOp:22
	vec4 n_out22p0 = n_out18p0 + n_out19p0;
	float n_out22p4 = n_out22p0.a;


// Output:0
	ALBEDO = vec3(n_out22p0.xyz);
	ALPHA = n_out22p4;


}
"
modes/depth_draw = 1
flags/depth_prepass_alpha = true
nodes/fragment/0/position = Vector2(1220, 280)
nodes/fragment/2/node = SubResource("VisualShaderNodeInput_nxokf")
nodes/fragment/2/position = Vector2(-580, 180)
nodes/fragment/5/node = SubResource("VisualShaderNodeFloatOp_pw0qj")
nodes/fragment/5/position = Vector2(-500, 440)
nodes/fragment/7/node = SubResource("VisualShaderNodeTexture_4c6mr")
nodes/fragment/7/position = Vector2(-280, 20)
nodes/fragment/8/node = SubResource("VisualShaderNodeFloatOp_v8kd6")
nodes/fragment/8/position = Vector2(-60, 340)
nodes/fragment/9/node = SubResource("VisualShaderNodeFloatFunc_h0gpf")
nodes/fragment/9/position = Vector2(140, 360)
nodes/fragment/13/node = SubResource("VisualShaderNodeTexture_ugjxq")
nodes/fragment/13/position = Vector2(260, 140)
nodes/fragment/14/node = SubResource("VisualShaderNodeTexture2DParameter_hqcdo")
nodes/fragment/14/position = Vector2(-60, 0)
nodes/fragment/15/node = SubResource("VisualShaderNodeColorParameter_rwgpq")
nodes/fragment/15/position = Vector2(40, 940)
nodes/fragment/18/node = SubResource("VisualShaderNodeVectorOp_g2jnk")
nodes/fragment/18/position = Vector2(500, 340)
nodes/fragment/19/node = SubResource("VisualShaderNodeVectorOp_ddxtc")
nodes/fragment/19/position = Vector2(600, 740)
nodes/fragment/21/node = SubResource("VisualShaderNodeVectorFunc_lymyr")
nodes/fragment/21/position = Vector2(360, 660)
nodes/fragment/22/node = SubResource("VisualShaderNodeVectorOp_s08rr")
nodes/fragment/22/position = Vector2(900.954, 607.998)
nodes/fragment/23/node = SubResource("VisualShaderNodeFloatParameter_8utgl")
nodes/fragment/23/position = Vector2(-1000, 460)
nodes/fragment/24/node = SubResource("VisualShaderNodeFloatFunc_pyn4g")
nodes/fragment/24/position = Vector2(-700, 460)
nodes/fragment/connections = PackedInt32Array(2, 0, 7, 0, 14, 0, 13, 2, 8, 0, 9, 0, 9, 0, 18, 1, 9, 0, 21, 0, 15, 0, 19, 1, 21, 0, 19, 0, 18, 0, 22, 0, 19, 0, 22, 1, 22, 0, 0, 0, 22, 4, 0, 1, 13, 0, 18, 0, 7, 0, 8, 0, 5, 0, 8, 1, 23, 0, 24, 0, 24, 0, 5, 0)
