[gd_resource type="VisualShader" load_steps=10 format=3 uid="uid://bcuduhlnij5mc"]

[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_pq5me"]
default_input_values = [0, 1.0, 1, 3.0]
operator = 5

[sub_resource type="VisualShaderNodeFloatConstant" id="VisualShaderNodeFloatConstant_2mt73"]

[sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_tiy0o"]
parameter_name = "glass_tint"

[sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_bh66u"]
parameter_name = "lightcolor"

[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_r112a"]
input_name = "uv"

[sub_resource type="VisualShaderNodeVectorDecompose" id="VisualShaderNodeVectorDecompose_al2rv"]

[sub_resource type="VisualShaderNodeFresnel" id="VisualShaderNodeFresnel_jji7r"]

[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_l4vls"]
operator = 2

[sub_resource type="VisualShaderNodeColorOp" id="VisualShaderNodeColorOp_kvrdk"]
operator = 8

[resource]
code = "shader_type spatial;
render_mode blend_add, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx;

uniform vec4 glass_tint : source_color;
uniform vec4 lightcolor : source_color;



void fragment() {
// ColorParameter:3
	vec4 n_out3p0 = glass_tint;


// FloatConstant:2
	float n_out2p0 = 0.000000;


// Input:5
	vec2 n_out5p0 = UV;


// VectorDecompose:6
	float n_out6p0 = vec3(n_out5p0, 0.0).x;
	float n_out6p1 = vec3(n_out5p0, 0.0).y;
	float n_out6p2 = vec3(n_out5p0, 0.0).z;


// FloatOp:11
	float n_in11p1 = 3.00000;
	float n_out11p0 = pow(n_out6p1, n_in11p1);


// ColorParameter:4
	vec4 n_out4p0 = lightcolor;


// Fresnel:7
	float n_in7p3 = 1.00000;
	float n_out7p0 = pow(1.0 - clamp(dot(NORMAL, VIEW), 0.0, 1.0), n_in7p3);


// VectorOp:8
	vec3 n_out8p0 = vec3(n_out4p0.xyz) * vec3(n_out7p0);


	vec3 n_out9p0;
// ColorOp:9
	{
		float base = vec3(n_out11p0).x;
		float blend = n_out8p0.x;
		if (base < 0.5) {
			n_out9p0.x = (base * (2.0 * blend));
		} else {
			n_out9p0.x = (1.0 - (1.0 - base) * (1.0 - 2.0 * (blend - 0.5)));
		}
	}
	{
		float base = vec3(n_out11p0).y;
		float blend = n_out8p0.y;
		if (base < 0.5) {
			n_out9p0.y = (base * (2.0 * blend));
		} else {
			n_out9p0.y = (1.0 - (1.0 - base) * (1.0 - 2.0 * (blend - 0.5)));
		}
	}
	{
		float base = vec3(n_out11p0).z;
		float blend = n_out8p0.z;
		if (base < 0.5) {
			n_out9p0.z = (base * (2.0 * blend));
		} else {
			n_out9p0.z = (1.0 - (1.0 - base) * (1.0 - 2.0 * (blend - 0.5)));
		}
	}


// Output:0
	ALBEDO = vec3(n_out3p0.xyz);
	ROUGHNESS = n_out2p0;
	EMISSION = n_out9p0;


}
"
graph_offset = Vector2(-417.912, 232.614)
modes/blend = 1
nodes/fragment/2/node = SubResource("VisualShaderNodeFloatConstant_2mt73")
nodes/fragment/2/position = Vector2(40, 260)
nodes/fragment/3/node = SubResource("VisualShaderNodeColorParameter_tiy0o")
nodes/fragment/3/position = Vector2(-280, 120)
nodes/fragment/4/node = SubResource("VisualShaderNodeColorParameter_bh66u")
nodes/fragment/4/position = Vector2(-680, 280)
nodes/fragment/5/node = SubResource("VisualShaderNodeInput_r112a")
nodes/fragment/5/position = Vector2(-960, 660)
nodes/fragment/6/node = SubResource("VisualShaderNodeVectorDecompose_al2rv")
nodes/fragment/6/position = Vector2(-620, 660)
nodes/fragment/7/node = SubResource("VisualShaderNodeFresnel_jji7r")
nodes/fragment/7/position = Vector2(-620, 460)
nodes/fragment/8/node = SubResource("VisualShaderNodeVectorOp_l4vls")
nodes/fragment/8/position = Vector2(-180, 380)
nodes/fragment/9/node = SubResource("VisualShaderNodeColorOp_kvrdk")
nodes/fragment/9/position = Vector2(40, 360)
nodes/fragment/11/node = SubResource("VisualShaderNodeFloatOp_pq5me")
nodes/fragment/11/position = Vector2(-380, 640)
nodes/fragment/connections = PackedInt32Array(2, 0, 0, 3, 3, 0, 0, 0, 5, 0, 6, 0, 4, 0, 8, 0, 7, 0, 8, 1, 6, 1, 11, 0, 9, 0, 0, 5, 8, 0, 9, 1, 11, 0, 9, 0)
