[gd_resource type="VisualShader" load_steps=17 format=2] [sub_resource type="VisualShaderNodeFresnel" id=4] default_input_values = [ 2, false, 3, 2.0 ] [sub_resource type="VisualShaderNodeColorConstant" id=5] constant = Color( 1, 0, 0, 1 ) [sub_resource type="VisualShaderNodeInput" id=19] input_name = "projection" [sub_resource type="VisualShaderNodeTransformDecompose" id=20] [sub_resource type="VisualShaderNodeVectorDecompose" id=21] [sub_resource type="VisualShaderNodeVectorDecompose" id=22] [sub_resource type="VisualShaderNodeScalarOp" id=23] [sub_resource type="VisualShaderNodeScalarOp" id=24] default_input_values = [ 0, 0.0, 1, 2.0 ] operator = 2 [sub_resource type="VisualShaderNodeScalarOp" id=25] default_input_values = [ 0, 0.0, 1, 1.0 ] operator = 1 [sub_resource type="VisualShaderNodeScalarOp" id=26] operator = 3 [sub_resource type="VisualShaderNodeInput" id=1] input_name = "screen_uv" [sub_resource type="VisualShaderNodeTexture" id=2] source = 4 [sub_resource type="VisualShaderNodeInput" id=3] input_name = "fragcoord" [sub_resource type="VisualShaderNodeVectorDecompose" id=16] [sub_resource type="VisualShaderNodeCompare" id=17] function = 4 [sub_resource type="VisualShaderNodeScalarSwitch" id=18] [resource] code = "shader_type spatial; render_mode blend_add, depth_draw_never, depth_test_disable, ambient_light_disabled; void vertex() { // Output:0 } void fragment() { // Color:11 vec3 n_out11p0 = vec3(1.000000, 0.000000, 0.000000); float n_out11p1 = 1.000000; // Input:12 mat4 n_out12p0 = PROJECTION_MATRIX; // TransformDecompose:13 vec3 n_out13p0 = n_out12p0[0].xyz; vec3 n_out13p1 = n_out12p0[1].xyz; vec3 n_out13p2 = n_out12p0[2].xyz; vec3 n_out13p3 = n_out12p0[3].xyz; // VectorDecompose:14 float n_out14p0 = n_out13p3.x; float n_out14p1 = n_out13p3.y; float n_out14p2 = n_out13p3.z; // Input:3 vec3 n_out3p0 = vec3(SCREEN_UV, 0.0); // Texture:4 float n_out4p0; float n_out4p1; { float _depth = texture(DEPTH_TEXTURE, n_out3p0.xy).r; n_out4p0 = _depth; n_out4p1 = 1.0; } // ScalarOp:17 float n_in17p1 = 2.00000; float n_out17p0 = n_out4p0 * n_in17p1; // ScalarOp:18 float n_in18p1 = 1.00000; float n_out18p0 = n_out17p0 - n_in18p1; // VectorDecompose:15 float n_out15p0 = n_out13p2.x; float n_out15p1 = n_out13p2.y; float n_out15p2 = n_out13p2.z; // ScalarOp:16 float n_out16p0 = n_out18p0 + n_out15p2; // ScalarOp:19 float n_out19p0 = n_out14p2 / n_out16p0; // Input:5 vec3 n_out5p0 = FRAGCOORD.xyz; // VectorDecompose:6 float n_out6p0 = n_out5p0.x; float n_out6p1 = n_out5p0.y; float n_out6p2 = n_out5p0.z; // Compare:7 bool n_out7p0 = n_out19p0