selection_shader.tres 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. [gd_resource type="VisualShader" load_steps=10 format=3 uid="uid://jbyhyuq05wht"]
  2. [sub_resource type="VisualShaderNodeFloatParameter" id="VisualShaderNodeFloatParameter_u8gr1"]
  3. parameter_name = "FlashSpeed"
  4. default_value_enabled = true
  5. default_value = 1.0
  6. [sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_rg6u3"]
  7. operator = 2
  8. [sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_eoh7g"]
  9. default_input_values = [0, 0.0, 1, 2.0]
  10. operator = 5
  11. [sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_0pb3b"]
  12. input_name = "time"
  13. [sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_qnyh6"]
  14. function = 0
  15. [sub_resource type="VisualShaderNodeFloatConstant" id="VisualShaderNodeFloatConstant_73l8h"]
  16. [sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_6h4gj"]
  17. expanded_output_ports = [0]
  18. parameter_name = "Color"
  19. default_value_enabled = true
  20. [sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_liq3u"]
  21. operator = 2
  22. [sub_resource type="VisualShaderNodeVectorCompose" id="VisualShaderNodeVectorCompose_6a7iv"]
  23. [resource]
  24. code = "shader_type spatial;
  25. render_mode blend_mix, depth_draw_always, cull_back, diffuse_lambert, specular_schlick_ggx;
  26. uniform vec4 Color : source_color = vec4(1.000000, 1.000000, 1.000000, 1.000000);
  27. uniform float FlashSpeed = 1;
  28. void fragment() {
  29. // ColorParameter:7
  30. vec4 n_out7p0 = Color;
  31. float n_out7p1 = n_out7p0.r;
  32. float n_out7p2 = n_out7p0.g;
  33. float n_out7p3 = n_out7p0.b;
  34. float n_out7p4 = n_out7p0.a;
  35. // VectorCompose:9
  36. vec3 n_out9p0 = vec3(n_out7p1, n_out7p2, n_out7p3);
  37. // Input:2
  38. float n_out2p0 = TIME;
  39. // FloatParameter:10
  40. float n_out10p0 = FlashSpeed;
  41. // FloatOp:11
  42. float n_out11p0 = n_out2p0 * n_out10p0;
  43. // FloatFunc:3
  44. float n_out3p0 = sin(n_out11p0);
  45. // FloatOp:12
  46. float n_in12p1 = 2.00000;
  47. float n_out12p0 = pow(n_out3p0, n_in12p1);
  48. // FloatOp:8
  49. float n_out8p0 = n_out7p4 * n_out12p0;
  50. // FloatConstant:4
  51. float n_out4p0 = 0.000000;
  52. // Output:0
  53. ALBEDO = n_out9p0;
  54. ALPHA = n_out8p0;
  55. METALLIC = n_out4p0;
  56. }
  57. "
  58. modes/depth_draw = 1
  59. nodes/fragment/0/position = Vector2(1300, 120)
  60. nodes/fragment/2/node = SubResource("VisualShaderNodeInput_0pb3b")
  61. nodes/fragment/2/position = Vector2(380, 140)
  62. nodes/fragment/3/node = SubResource("VisualShaderNodeFloatFunc_qnyh6")
  63. nodes/fragment/3/position = Vector2(740, 300)
  64. nodes/fragment/4/node = SubResource("VisualShaderNodeFloatConstant_73l8h")
  65. nodes/fragment/4/position = Vector2(1060, 300)
  66. nodes/fragment/7/node = SubResource("VisualShaderNodeColorParameter_6h4gj")
  67. nodes/fragment/7/position = Vector2(660, -160)
  68. nodes/fragment/8/node = SubResource("VisualShaderNodeFloatOp_liq3u")
  69. nodes/fragment/8/position = Vector2(1100, 140)
  70. nodes/fragment/9/node = SubResource("VisualShaderNodeVectorCompose_6a7iv")
  71. nodes/fragment/9/position = Vector2(1100, -20)
  72. nodes/fragment/10/node = SubResource("VisualShaderNodeFloatParameter_u8gr1")
  73. nodes/fragment/10/position = Vector2(400, 240)
  74. nodes/fragment/11/node = SubResource("VisualShaderNodeFloatOp_rg6u3")
  75. nodes/fragment/11/position = Vector2(680, 140)
  76. nodes/fragment/12/node = SubResource("VisualShaderNodeFloatOp_eoh7g")
  77. nodes/fragment/12/position = Vector2(920, 200)
  78. nodes/fragment/connections = PackedInt32Array(4, 0, 0, 2, 7, 4, 8, 0, 8, 0, 0, 1, 9, 0, 0, 0, 7, 3, 9, 2, 7, 2, 9, 1, 7, 1, 9, 0, 10, 0, 11, 1, 11, 0, 3, 0, 2, 0, 11, 0, 3, 0, 12, 0, 12, 0, 8, 1)