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

[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_t1tvu"]
parameter_name = "Vignette"
texture_filter = 4
texture_repeat = 1

[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_qsusy"]
source = 5

[sub_resource type="VisualShaderNodeMultiplyAdd" id="VisualShaderNodeMultiplyAdd_e4whf"]

[sub_resource type="VisualShaderNodeVec2Constant" id="VisualShaderNodeVec2Constant_4drcy"]
constant = Vector2(0.1, 0)

[sub_resource type="VisualShaderNodeUVPolarCoord" id="VisualShaderNodeUVPolarCoord_0o2bh"]
default_input_values = [1, Vector2(0.5, 0.5), 2, 0.5, 3, 1.0]

[sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_juddb"]
parameter_name = "VignetteColor"

[sub_resource type="VisualShaderNodeUVFunc" id="VisualShaderNodeUVFunc_1ddw1"]
default_input_values = [1, Vector2(0.9, 0.9), 2, Vector2(0.5, 0.5)]
function = 1

[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_w3k0x"]

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

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

[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_4s8mp"]
default_input_values = [0, Vector3(1, 1, 1), 1, Vector3(-1, -1, 0)]
operator = 1

[sub_resource type="VisualShaderNodeVec2Parameter" id="VisualShaderNodeVec2Parameter_ren8n"]
parameter_name = "UVScale"

[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_24i63"]
input_name = "screen_uv"

[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_le3j7"]
source = 5

[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_u0lfa"]
parameter_name = "ScreenTexture"
texture_filter = 4
texture_source = 1

[sub_resource type="VisualShaderNodeFloatParameter" id="VisualShaderNodeFloatParameter_383fa"]
parameter_name = "BlurAmount"
hint = 2
max = 5.0

[resource]
code = "shader_type canvas_item;
render_mode blend_disabled;

uniform vec2 UVScale;
uniform float BlurAmount : hint_range(0, 5, 0.10000000149012);
uniform sampler2D ScreenTexture : filter_linear_mipmap, hint_screen_texture;
uniform sampler2D Vignette : filter_linear_mipmap, repeat_enable;
uniform vec4 VignetteColor : source_color;



void fragment() {
// Input:4
	vec2 n_out4p0 = SCREEN_UV;


// Vector2Parameter:27
	vec2 n_out27p0 = UVScale;


// UVFunc:21
	vec2 n_in21p2 = vec2(0.50000, 0.50000);
	vec2 n_out21p0 = (n_out4p0 - n_in21p2) * n_out27p0 + n_in21p2;


// FloatParameter:9
	float n_out9p0 = BlurAmount;


	vec4 n_out7p0;
// Texture2D:7
	n_out7p0 = textureLod(ScreenTexture, n_out21p0, n_out9p0);


	vec2 n_out18p0;
// UVPolarCoord:18
	vec2 n_in18p1 = vec2(0.50000, 0.50000);
	float n_in18p2 = 0.50000;
	float n_in18p3 = 1.00000;
	{
		vec2 __dir = UV - n_in18p1;
		float __radius = length(__dir) * 2.0;
		float __angle = atan(__dir.y, __dir.x) * 1.0 / (PI * 2.0);
		n_out18p0 = mod(vec2(__radius * n_in18p2, __angle * n_in18p3), 1.0);
	}


// Vector2Constant:16
	vec2 n_out16p0 = vec2(0.100000, 0.000000);


// MultiplyAdd:15
	float n_in15p1 = 1.00000;
	float n_out15p0 = fma(n_out18p0.x, n_in15p1, n_out16p0.x);


	vec4 n_out11p0;
// Texture2D:11
	n_out11p0 = texture(Vignette, vec2(n_out15p0));


// VectorOp:26
	vec3 n_in26p0 = vec3(1.00000, 1.00000, 1.00000);
	vec3 n_out26p0 = n_in26p0 - vec3(n_out11p0.xyz);


// ColorParameter:20
	vec4 n_out20p0 = VignetteColor;


// VectorOp:25
	vec3 n_out25p0 = n_out26p0 * vec3(n_out20p0.xyz);


// VectorOp:23
	vec3 n_out23p0 = vec3(n_out11p0.xyz) + n_out25p0;


// VectorOp:24
	vec3 n_out24p0 = vec3(n_out7p0.xyz) * n_out23p0;


// Output:0
	COLOR.rgb = n_out24p0;


}
"
mode = 1
modes/blend = 5
flags/light_only = false
nodes/fragment/0/position = Vector2(680, 160)
nodes/fragment/4/node = SubResource("VisualShaderNodeInput_24i63")
nodes/fragment/4/position = Vector2(-760, -620)
nodes/fragment/7/node = SubResource("VisualShaderNodeTexture_le3j7")
nodes/fragment/7/position = Vector2(20, -320)
nodes/fragment/8/node = SubResource("VisualShaderNodeTexture2DParameter_u0lfa")
nodes/fragment/8/position = Vector2(-480, -120)
nodes/fragment/9/node = SubResource("VisualShaderNodeFloatParameter_383fa")
nodes/fragment/9/position = Vector2(-420, -440)
nodes/fragment/10/node = SubResource("VisualShaderNodeTexture2DParameter_t1tvu")
nodes/fragment/10/position = Vector2(-1140, 740)
nodes/fragment/11/node = SubResource("VisualShaderNodeTexture_qsusy")
nodes/fragment/11/position = Vector2(-660, 620)
nodes/fragment/15/node = SubResource("VisualShaderNodeMultiplyAdd_e4whf")
nodes/fragment/15/position = Vector2(-1000, 500)
nodes/fragment/16/node = SubResource("VisualShaderNodeVec2Constant_4drcy")
nodes/fragment/16/position = Vector2(-1240, 580)
nodes/fragment/18/node = SubResource("VisualShaderNodeUVPolarCoord_0o2bh")
nodes/fragment/18/position = Vector2(-1280, 380)
nodes/fragment/20/node = SubResource("VisualShaderNodeColorParameter_juddb")
nodes/fragment/20/position = Vector2(-560, 1040)
nodes/fragment/21/node = SubResource("VisualShaderNodeUVFunc_1ddw1")
nodes/fragment/21/position = Vector2(-380, -640)
nodes/fragment/23/node = SubResource("VisualShaderNodeVectorOp_w3k0x")
nodes/fragment/23/position = Vector2(20, 600)
nodes/fragment/24/node = SubResource("VisualShaderNodeVectorOp_0a06v")
nodes/fragment/24/position = Vector2(400, 180)
nodes/fragment/25/node = SubResource("VisualShaderNodeVectorOp_g3bno")
nodes/fragment/25/position = Vector2(-160, 840)
nodes/fragment/26/node = SubResource("VisualShaderNodeVectorOp_4s8mp")
nodes/fragment/26/position = Vector2(-420, 780)
nodes/fragment/27/node = SubResource("VisualShaderNodeVec2Parameter_ren8n")
nodes/fragment/27/position = Vector2(-1060, -680)
nodes/fragment/connections = PackedInt32Array(8, 0, 7, 2, 9, 0, 7, 1, 10, 0, 11, 2, 15, 0, 11, 0, 16, 0, 15, 2, 18, 0, 15, 0, 4, 0, 21, 0, 11, 0, 23, 0, 25, 0, 23, 1, 20, 0, 25, 1, 26, 0, 25, 0, 11, 0, 26, 1, 21, 0, 7, 0, 27, 0, 21, 1, 7, 0, 24, 0, 23, 0, 24, 1, 24, 0, 0, 0)
