受击特效优化
parent
69a9d5c981
commit
5ff48d18e4
@ -1,10 +0,0 @@
|
|||||||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://tlhcll6fyp7q"]
|
|
||||||
|
|
||||||
[ext_resource type="Shader" path="res://render/shader/effect_billboard.gdshader" id="1_jw6vt"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bb0yfk0u4lqqn" path="res://render/texture/particle/shape/flare.png" id="2_ax7mv"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
render_priority = 0
|
|
||||||
shader = ExtResource("1_jw6vt")
|
|
||||||
shader_parameter/sheet_size = Vector2(1, 1)
|
|
||||||
shader_parameter/tex_main = ExtResource("2_ax7mv")
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
shader_type spatial;
|
|
||||||
render_mode blend_add,unshaded;
|
|
||||||
|
|
||||||
uniform sampler2D tex_main : source_color;
|
|
||||||
uniform vec2 sheet_size = vec2(1,1);
|
|
||||||
|
|
||||||
//void vertex() {
|
|
||||||
//vec3 billboard_offset = VERTEX;
|
|
||||||
//VERTEX.xz = normalize(INV_VIEW_MATRIX[0].xz) * billboard_offset.x + normalize(INV_VIEW_MATRIX[2].xz) * billboard_offset.z;
|
|
||||||
//VERTEX.y = billboard_offset.y;
|
|
||||||
//}
|
|
||||||
|
|
||||||
void fragment() {
|
|
||||||
vec4 col = texture(tex_main, UV);
|
|
||||||
ALBEDO = mix(col.rgb, COLOR.rgb, COLOR.a);
|
|
||||||
ALPHA = col.r;
|
|
||||||
}
|
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
shader_type spatial;
|
||||||
|
render_mode blend_add,unshaded,depth_test_disabled;
|
||||||
|
|
||||||
|
uniform sampler2D tex_main : source_color;
|
||||||
|
uniform bool is_billboard;
|
||||||
|
|
||||||
|
void vertex() {
|
||||||
|
if (is_billboard){
|
||||||
|
vec3 billboard_offset = VERTEX;
|
||||||
|
VERTEX.xz = normalize(INV_VIEW_MATRIX[0].xz) * billboard_offset.x + normalize(INV_VIEW_MATRIX[2].xz) * billboard_offset.z;
|
||||||
|
VERTEX.y = billboard_offset.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
vec4 col = texture(tex_main, UV);
|
||||||
|
ALBEDO = COLOR.rgb * col.r;
|
||||||
|
ALPHA = COLOR.a * col.r;
|
||||||
|
}
|
||||||
@ -1,35 +1,99 @@
|
|||||||
[gd_scene load_steps=6 format=3 uid="uid://io1yfgjm480t"]
|
[gd_scene load_steps=19 format=3 uid="uid://io1yfgjm480t"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://script/effect/particle.gd" id="1_qxvm2"]
|
[ext_resource type="Script" path="res://script/effect/particle.gd" id="1_qxvm2"]
|
||||||
[ext_resource type="Material" uid="uid://tlhcll6fyp7q" path="res://render/material/effect_hit.tres" id="2_54a52"]
|
[ext_resource type="Shader" path="res://render/shader/particle.gdshader" id="2_hr443"]
|
||||||
[ext_resource type="Material" uid="uid://bns2vfyf2qy6u" path="res://render/process_material/hit_normal.tres" id="3_1alqw"]
|
[ext_resource type="Texture2D" uid="uid://bb0yfk0u4lqqn" path="res://render/texture/particle/shape/flare.png" id="3_c5vjp"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://colhtjt8jon3v" path="res://render/texture/particle/shape/smoke.png" id="5_loelc"]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_dkmkb"]
|
||||||
|
render_priority = 0
|
||||||
|
shader = ExtResource("2_hr443")
|
||||||
|
shader_parameter/is_billboard = null
|
||||||
|
shader_parameter/tex_main = ExtResource("3_c5vjp")
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_n5hkj"]
|
||||||
|
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.82266, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 3
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_hdmmt"]
|
||||||
|
curve = SubResource("Curve_n5hkj")
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_2o6rl"]
|
||||||
|
max_value = 6.0
|
||||||
|
_data = [Vector2(0, 4.81319), 0.0, 9.63692, 0, 0, Vector2(0.123153, 6), 0.0, 0.0, 0, 0, Vector2(0.221675, 6), 0.0, 0.0, 0, 0, Vector2(1, 4.68132), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 4
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_5ce5r"]
|
||||||
|
curve = SubResource("Curve_2o6rl")
|
||||||
|
|
||||||
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_acw2w"]
|
||||||
|
angle_min = -72.3
|
||||||
|
angle_max = -72.3
|
||||||
|
gravity = Vector3(0, 0, 0)
|
||||||
|
scale_curve = SubResource("CurveTexture_5ce5r")
|
||||||
|
color = Color(0.635294, 0.827451, 1, 1)
|
||||||
|
alpha_curve = SubResource("CurveTexture_hdmmt")
|
||||||
|
|
||||||
[sub_resource type="QuadMesh" id="QuadMesh_0j7av"]
|
[sub_resource type="QuadMesh" id="QuadMesh_0j7av"]
|
||||||
|
|
||||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_pcbb8"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_vkw8i"]
|
||||||
|
render_priority = 0
|
||||||
|
shader = ExtResource("2_hr443")
|
||||||
|
shader_parameter/is_billboard = false
|
||||||
|
shader_parameter/tex_main = ExtResource("5_loelc")
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_didyq"]
|
||||||
|
_data = [Vector2(0, 0.32967), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_3pi6l"]
|
||||||
|
curve = SubResource("Curve_didyq")
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_6dnuy"]
|
||||||
|
max_value = 4.0
|
||||||
|
_data = [Vector2(0, 1.75824), 0.0, 0.0, 0, 0, Vector2(1, 2.76923), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_skg43"]
|
||||||
|
curve = SubResource("Curve_6dnuy")
|
||||||
|
|
||||||
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_gjwvd"]
|
||||||
|
angle_min = 1.07288e-05
|
||||||
|
angle_max = 720.0
|
||||||
|
velocity_pivot = Vector3(0, 0, 1)
|
||||||
|
spread = 180.0
|
||||||
|
initial_velocity_max = 0.2
|
||||||
|
gravity = Vector3(0, 0, 0)
|
||||||
|
scale_curve = SubResource("CurveTexture_skg43")
|
||||||
|
color = Color(0.521569, 0.509804, 0.501961, 1)
|
||||||
|
alpha_curve = SubResource("CurveTexture_3pi6l")
|
||||||
|
|
||||||
|
[sub_resource type="QuadMesh" id="QuadMesh_0kefl"]
|
||||||
|
|
||||||
[node name="Particle" type="Node3D"]
|
[node name="Particle" type="Node3D"]
|
||||||
script = ExtResource("1_qxvm2")
|
script = ExtResource("1_qxvm2")
|
||||||
|
|
||||||
[node name="Slash" type="GPUParticles3D" parent="."]
|
[node name="Slash" type="GPUParticles3D" parent="."]
|
||||||
material_override = ExtResource("2_54a52")
|
layers = 512
|
||||||
|
material_override = SubResource("ShaderMaterial_dkmkb")
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
emitting = false
|
emitting = false
|
||||||
amount = 1
|
amount = 1
|
||||||
lifetime = 0.25
|
lifetime = 0.15
|
||||||
one_shot = true
|
one_shot = true
|
||||||
fixed_fps = 60
|
fixed_fps = 60
|
||||||
local_coords = true
|
local_coords = true
|
||||||
process_material = ExtResource("3_1alqw")
|
process_material = SubResource("ParticleProcessMaterial_acw2w")
|
||||||
draw_pass_1 = SubResource("QuadMesh_0j7av")
|
draw_pass_1 = SubResource("QuadMesh_0j7av")
|
||||||
|
|
||||||
[node name="Smoke" type="GPUParticles3D" parent="."]
|
[node name="Smoke" type="GPUParticles3D" parent="."]
|
||||||
visible = false
|
layers = 512
|
||||||
|
material_override = SubResource("ShaderMaterial_vkw8i")
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
emitting = false
|
emitting = false
|
||||||
amount = 1
|
amount = 2
|
||||||
lifetime = 0.25
|
lifetime = 2.0
|
||||||
fixed_fps = 60
|
one_shot = true
|
||||||
local_coords = true
|
explosiveness = 1.0
|
||||||
process_material = SubResource("ParticleProcessMaterial_pcbb8")
|
process_material = SubResource("ParticleProcessMaterial_gjwvd")
|
||||||
draw_pass_1 = SubResource("QuadMesh_0j7av")
|
draw_pass_1 = SubResource("QuadMesh_0kefl")
|
||||||
|
|||||||
Loading…
Reference in New Issue