通用攻击特效 - 环形空间扭曲效果
parent
188b18b8b1
commit
514c4e2cc1
@ -1,13 +1,13 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=5 format=3 uid="uid://bkbuvtya3uk3x"]
|
||||
[gd_resource type="ShaderMaterial" load_steps=4 format=3 uid="uid://bkbuvtya3uk3x"]
|
||||
|
||||
[ext_resource type="Shader" path="res://render/shader/effect_slash.gdshader" id="1_igfou"]
|
||||
[ext_resource type="Texture2D" uid="uid://dd3e7ol8qa5eq" path="res://render/texture/noise/noise2.png" id="2_hohok"]
|
||||
[ext_resource type="Texture2D" uid="uid://cksxjvafx2skm" path="res://render/texture/mask/mask5.png" id="3_mbqrk"]
|
||||
[ext_resource type="Shader" path="res://render/shader/effect_skew1.gdshader" id="1_dcuof"]
|
||||
[ext_resource type="Texture2D" uid="uid://csjm7d1tg6b50" path="res://render/texture/mask/mask6.png" id="3_p44lv"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4byf37he3mjt" path="res://render/texture/noise/noise1.png" id="4_vjpnf"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_igfou")
|
||||
shader_parameter/tex_main = ExtResource("2_hohok")
|
||||
shader_parameter/tex_noise = ExtResource("4_vjpnf")
|
||||
shader_parameter/tex_mask = ExtResource("3_mbqrk")
|
||||
shader = ExtResource("1_dcuof")
|
||||
shader_parameter/distortionView = 0.06
|
||||
shader_parameter/speedView = 0.5
|
||||
shader_parameter/noise = ExtResource("4_vjpnf")
|
||||
shader_parameter/tex_mask = ExtResource("3_p44lv")
|
||||
|
||||
@ -1,16 +1,22 @@
|
||||
shader_type spatial;
|
||||
render_mode blend_add,unshaded;
|
||||
|
||||
uniform sampler2D tex_noise : source_color;
|
||||
render_mode unshaded;
|
||||
|
||||
uniform sampler2D noise;
|
||||
uniform sampler2D tex_mask : source_color;
|
||||
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
|
||||
uniform float distortionView : hint_range(0.0, 0.3, 0.005) = 0.03;
|
||||
uniform float speedView : hint_range(0.0, 1.0, 0.005) = 0.5;
|
||||
uniform sampler2D screenTexture : hint_screen_texture;
|
||||
|
||||
void fragment() {
|
||||
void fragment()
|
||||
{
|
||||
vec2 uv2 = UV - 1.0 * vec2(mod(TIME, 2.0) - 1.0, 0);
|
||||
vec4 col_noise = texture(tex_noise, UV - 0.5 * vec2(mod(TIME, 2.0) - 1.0, 0));
|
||||
vec4 col_mask = texture(tex_mask, UV);
|
||||
vec4 col_screen = textureLod(screen_texture, SCREEN_UV, 0.0);
|
||||
vec4 col = col_screen;
|
||||
ALBEDO = col.rgb;
|
||||
ALPHA = col_mask.r;
|
||||
}
|
||||
|
||||
float noiseValueX = (texture(noise, UV + (TIME * speedView)).r * 2.0) - 1.0; // Range: -1.0 to 1.0
|
||||
float noiseValueY = (texture(noise, UV + (TIME * speedView)).r * 2.0) - 1.0; // Range: -1.0 to 1.0
|
||||
vec2 noiseDistort = vec2(noiseValueX, noiseValueY) * distortionView * col_mask.r;;
|
||||
vec3 distortedScreenTexture = vec3(texture(screenTexture, SCREEN_UV + noiseDistort).rgb);
|
||||
|
||||
ALBEDO = distortedScreenTexture;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://csjm7d1tg6b50"
|
||||
path="res://.godot/imported/mask6.png-bfc308add2dfa12fcdf95a205d0d505a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://render/texture/mask/mask6.png"
|
||||
dest_files=["res://.godot/imported/mask6.png-bfc308add2dfa12fcdf95a205d0d505a.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=0
|
||||
compress/normal_map=2
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=false
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
Loading…
Reference in New Issue