game: add bullet and impacts
This commit is contained in:
105
game/bullet_decal_smoke.tres
Normal file
105
game/bullet_decal_smoke.tres
Normal file
@@ -0,0 +1,105 @@
|
||||
[gd_resource type="VisualShader" load_steps=10 format=3 uid="uid://d4ml3kj8ympbf"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://exuvqvppvyre" path="res://assets/textures/cloud_noise.png" id="1_exml1"]
|
||||
[ext_resource type="Texture2D" uid="uid://b7n43gk3vc0cm" path="res://assets/textures/circle_mask.png" id="2_3sobh"]
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_mjuxj"]
|
||||
output_port_for_preview = 0
|
||||
expanded_output_ports = [0]
|
||||
texture = ExtResource("1_exml1")
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_xamyu"]
|
||||
expanded_output_ports = [0]
|
||||
texture = ExtResource("2_3sobh")
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_qilve"]
|
||||
expanded_output_ports = [0]
|
||||
input_name = "color"
|
||||
|
||||
[sub_resource type="VisualShaderNodeRemap" id="VisualShaderNodeRemap_bocjt"]
|
||||
default_input_values = [1, 0.0, 2, 1.0, 3, 0.0, 4, 8.0]
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_t3qas"]
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_586rk"]
|
||||
expanded_output_ports = [0]
|
||||
input_name = "color"
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_74lg2"]
|
||||
operator = 2
|
||||
|
||||
[resource]
|
||||
code = "shader_type spatial;
|
||||
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx;
|
||||
|
||||
uniform sampler2D tex_frg_2;
|
||||
uniform sampler2D tex_frg_3;
|
||||
|
||||
|
||||
|
||||
void fragment() {
|
||||
// Input:4
|
||||
vec4 n_out4p0 = COLOR;
|
||||
float n_out4p1 = n_out4p0.r;
|
||||
|
||||
|
||||
float n_out5p0;
|
||||
// Remap:5
|
||||
float n_in5p1 = 0.00000;
|
||||
float n_in5p2 = 1.00000;
|
||||
float n_in5p3 = 0.00000;
|
||||
float n_in5p4 = 8.00000;
|
||||
{
|
||||
float __input_range = n_in5p2 - n_in5p1;
|
||||
float __output_range = n_in5p4 - n_in5p3;
|
||||
n_out5p0 = n_in5p3 + __output_range * ((n_out4p1 - n_in5p1) / __input_range);
|
||||
}
|
||||
|
||||
|
||||
// Texture2D:2
|
||||
vec4 n_out2p0 = textureLod(tex_frg_2, UV, n_out5p0);
|
||||
float n_out2p1 = n_out2p0.r;
|
||||
|
||||
|
||||
// Texture2D:3
|
||||
vec4 n_out3p0 = texture(tex_frg_3, UV);
|
||||
float n_out3p1 = n_out3p0.r;
|
||||
|
||||
|
||||
// FloatOp:6
|
||||
float n_out6p0 = n_out2p1 * n_out3p1;
|
||||
|
||||
|
||||
// Input:7
|
||||
vec4 n_out7p0 = COLOR;
|
||||
float n_out7p4 = n_out7p0.a;
|
||||
|
||||
|
||||
// FloatOp:8
|
||||
float n_out8p0 = n_out6p0 * n_out7p4;
|
||||
|
||||
|
||||
// Output:0
|
||||
ALPHA = n_out8p0;
|
||||
|
||||
|
||||
}
|
||||
"
|
||||
graph_offset = Vector2(-547.271, 545.865)
|
||||
nodes/fragment/0/position = Vector2(400, 900)
|
||||
nodes/fragment/2/node = SubResource("VisualShaderNodeTexture_mjuxj")
|
||||
nodes/fragment/2/position = Vector2(-360, 400)
|
||||
nodes/fragment/3/node = SubResource("VisualShaderNodeTexture_xamyu")
|
||||
nodes/fragment/3/position = Vector2(-1240, 1020)
|
||||
nodes/fragment/4/node = SubResource("VisualShaderNodeInput_qilve")
|
||||
nodes/fragment/4/position = Vector2(-1080, 360)
|
||||
nodes/fragment/5/node = SubResource("VisualShaderNodeRemap_bocjt")
|
||||
nodes/fragment/5/position = Vector2(-700, 500)
|
||||
nodes/fragment/6/node = SubResource("VisualShaderNodeFloatOp_t3qas")
|
||||
nodes/fragment/6/position = Vector2(-80, 900)
|
||||
nodes/fragment/7/node = SubResource("VisualShaderNodeInput_586rk")
|
||||
nodes/fragment/7/position = Vector2(-420, 1240)
|
||||
nodes/fragment/8/node = SubResource("VisualShaderNodeFloatOp_74lg2")
|
||||
nodes/fragment/8/position = Vector2(140, 1040)
|
||||
nodes/fragment/connections = PackedInt32Array(4, 1, 5, 0, 5, 0, 2, 1, 2, 1, 6, 0, 3, 1, 6, 1, 7, 4, 8, 1, 6, 0, 8, 0, 8, 0, 0, 1)
|
Reference in New Issue
Block a user