added new effects to entrance area

pull/6/head^2
John Montagu, the 4th Earl of Sandvich 2023-09-07 11:53:03 -07:00
parent 153132c48d
commit a7b75a8ba1
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
5 changed files with 175 additions and 31 deletions

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://cuu0kcsmlchgu"
path="res://.godot/imported/lake-waves.mp3-5b6f2a2274aba65cf71981123a3654d0.mp3str"
[deps]
source_file="res://Assets/Sounds/lake-waves.mp3"
dest_files=["res://.godot/imported/lake-waves.mp3-5b6f2a2274aba65cf71981123a3654d0.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=67 format=3 uid="uid://dr3bcvql7burk"] [gd_scene load_steps=72 format=3 uid="uid://dr3bcvql7burk"]
[ext_resource type="PackedScene" uid="uid://clwv2owvk6abe" path="res://Scenes/BaseMap.tscn" id="1_ci4ij"] [ext_resource type="PackedScene" uid="uid://clwv2owvk6abe" path="res://Scenes/BaseMap.tscn" id="1_ci4ij"]
[ext_resource type="TileSet" uid="uid://l61kbx31ug4p" path="res://Scenes/Maps/ArenaTileset.tres" id="2_m6h7j"] [ext_resource type="TileSet" uid="uid://l61kbx31ug4p" path="res://Scenes/Maps/ArenaTileset.tres" id="2_m6h7j"]
@ -18,6 +18,7 @@
[ext_resource type="Texture2D" uid="uid://ds0xg848g3jid" path="res://Assets/Sprites/Props/tree-dark-5.png" id="12_md5xh"] [ext_resource type="Texture2D" uid="uid://ds0xg848g3jid" path="res://Assets/Sprites/Props/tree-dark-5.png" id="12_md5xh"]
[ext_resource type="Texture2D" uid="uid://8rbstele3ckq" path="res://Assets/Sprites/Props/tree-dark-4.png" id="13_j84wc"] [ext_resource type="Texture2D" uid="uid://8rbstele3ckq" path="res://Assets/Sprites/Props/tree-dark-4.png" id="13_j84wc"]
[ext_resource type="Texture2D" uid="uid://wuvwd5corw3f" path="res://Assets/Sprites/Props/arena-stairs.png" id="14_i2ht5"] [ext_resource type="Texture2D" uid="uid://wuvwd5corw3f" path="res://Assets/Sprites/Props/arena-stairs.png" id="14_i2ht5"]
[ext_resource type="Shader" path="res://Shaders/WindSwayUnshaded.gdshader" id="15_pmjmi"]
[ext_resource type="Shader" path="res://Shaders/Water.gdshader" id="15_vlb8v"] [ext_resource type="Shader" path="res://Shaders/Water.gdshader" id="15_vlb8v"]
[ext_resource type="Texture2D" uid="uid://dngclnqt7pe3k" path="res://Assets/Sprites/Particles/NoiseSmall.tres" id="17_j6kc0"] [ext_resource type="Texture2D" uid="uid://dngclnqt7pe3k" path="res://Assets/Sprites/Particles/NoiseSmall.tres" id="17_j6kc0"]
[ext_resource type="Texture2D" uid="uid://dejwdw7or8c" path="res://Assets/Sprites/Particles/NoiseLarge.tres" id="18_1c1fg"] [ext_resource type="Texture2D" uid="uid://dejwdw7or8c" path="res://Assets/Sprites/Particles/NoiseLarge.tres" id="18_1c1fg"]
@ -28,6 +29,7 @@
[ext_resource type="Material" uid="uid://b64pfv5ocwegv" path="res://Assets/Sprites/Particles/ArenaLeaves.tres" id="23_4ibaf"] [ext_resource type="Material" uid="uid://b64pfv5ocwegv" path="res://Assets/Sprites/Particles/ArenaLeaves.tres" id="23_4ibaf"]
[ext_resource type="PackedScene" uid="uid://dhl071rj5wyvx" path="res://Entities/Campfire.tscn" id="23_mykt8"] [ext_resource type="PackedScene" uid="uid://dhl071rj5wyvx" path="res://Entities/Campfire.tscn" id="23_mykt8"]
[ext_resource type="Texture2D" uid="uid://d2vhmsc65ichv" path="res://Assets/Sprites/Particles/leaf-white.png" id="23_qkkt0"] [ext_resource type="Texture2D" uid="uid://d2vhmsc65ichv" path="res://Assets/Sprites/Particles/leaf-white.png" id="23_qkkt0"]
[ext_resource type="AudioStream" uid="uid://cuu0kcsmlchgu" path="res://Assets/Sounds/lake-waves.mp3" id="26_2g1h3"]
[ext_resource type="PackedScene" uid="uid://cdj50hb84aujp" path="res://Characters/DocLegionary.tscn" id="27_84gw4"] [ext_resource type="PackedScene" uid="uid://cdj50hb84aujp" path="res://Characters/DocLegionary.tscn" id="27_84gw4"]
[ext_resource type="Shader" path="res://Shaders/Flash.gdshader" id="28_b3suq"] [ext_resource type="Shader" path="res://Shaders/Flash.gdshader" id="28_b3suq"]
[ext_resource type="PackedScene" uid="uid://dhamcei7tfta8" path="res://Characters/DocCenturion.tscn" id="30_qfl2k"] [ext_resource type="PackedScene" uid="uid://dhamcei7tfta8" path="res://Characters/DocCenturion.tscn" id="30_qfl2k"]
@ -137,9 +139,36 @@ shader_parameter/seed = 3.0
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_47ohj"] [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_47ohj"]
light_mode = 1 light_mode = 1
[sub_resource type="ShaderMaterial" id="ShaderMaterial_so677"]
shader = ExtResource("15_pmjmi")
shader_parameter/speed = 1.0
shader_parameter/minStrength = 0.05
shader_parameter/maxStrength = 0.01
shader_parameter/strengthScale = 100.0
shader_parameter/interval = 3.5
shader_parameter/detail = 1.0
shader_parameter/distortion = null
shader_parameter/heightOffset = null
shader_parameter/offset = 0.0
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_wt525"] [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_wt525"]
light_mode = 1 light_mode = 1
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b00lw"]
shader = ExtResource("15_pmjmi")
shader_parameter/speed = 1.0
shader_parameter/minStrength = 0.05
shader_parameter/maxStrength = 0.02
shader_parameter/strengthScale = 100.0
shader_parameter/interval = 2.0
shader_parameter/detail = 1.0
shader_parameter/distortion = 1.0
shader_parameter/heightOffset = null
shader_parameter/offset = 0.0
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_txrwk"]
light_mode = 1
[sub_resource type="ShaderMaterial" id="ShaderMaterial_6r42m"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_6r42m"]
shader = ExtResource("15_vlb8v") shader = ExtResource("15_vlb8v")
shader_parameter/alpha = 0.75 shader_parameter/alpha = 0.75
@ -166,91 +195,91 @@ size = Vector2(64, 97)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5pcme"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_5pcme"]
size = Vector2(18, 6) size = Vector2(18, 6)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_mg83a"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_rmd68"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_elrp0"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_mfl5e"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_7olcb"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_5dit0"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_d2b1c"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_s1isy"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_3qqeq"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_57t45"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_u0yfp"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_2s5o2"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lxojq"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_hgfsn"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_6i24g"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_8o8wb"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_o80y1"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_nnd4x"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_bc5nr"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_muryx"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_wcyyo"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_2qvkn"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_gnvby"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_o7meu"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
shader_parameter/intensity = 0.0 shader_parameter/intensity = 0.0
shader_parameter/alpha_modulate = 1.0 shader_parameter/alpha_modulate = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_8o4l7"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_52xin"]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource("28_b3suq") shader = ExtResource("28_b3suq")
shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/color = Vector4(1, 1, 1, 1)
@ -522,10 +551,11 @@ offset = Vector2(32, -32)
[node name="Static@Node2D2" type="Node2D" parent="Props" index="18"] [node name="Static@Node2D2" type="Node2D" parent="Props" index="18"]
z_index = 2 z_index = 2
material = SubResource("ShaderMaterial_so677")
position = Vector2(696, 559) position = Vector2(696, 559)
[node name="Sprite2D" type="Sprite2D" parent="Props/Static@Node2D2" index="0"] [node name="Sprite2D" type="Sprite2D" parent="Props/Static@Node2D2" index="0"]
material = SubResource("CanvasItemMaterial_wt525") use_parent_material = true
position = Vector2(40, 24) position = Vector2(40, 24)
texture = ExtResource("10_sx2hw") texture = ExtResource("10_sx2hw")
offset = Vector2(-48, -64) offset = Vector2(-48, -64)
@ -539,17 +569,17 @@ offset = Vector2(-48, -64)
[node name="StaticNode2D2" type="Node2D" parent="Props" index="19"] [node name="StaticNode2D2" type="Node2D" parent="Props" index="19"]
z_index = 1 z_index = 1
material = SubResource("ShaderMaterial_b00lw")
position = Vector2(705, 447) position = Vector2(705, 447)
[node name="Sprite2D" type="Sprite2D" parent="Props/StaticNode2D2" index="0"] [node name="Sprite2D" type="Sprite2D" parent="Props/StaticNode2D2" index="0"]
material = SubResource("CanvasItemMaterial_wt525") use_parent_material = true
position = Vector2(40, 24) position = Vector2(40, 24)
texture = ExtResource("12_md5xh") texture = ExtResource("12_md5xh")
offset = Vector2(-48, -64) offset = Vector2(-48, -64)
[node name="Sprite2D2" type="Sprite2D" parent="Props/StaticNode2D2" index="1"] [node name="Sprite2D2" type="Sprite2D" parent="Props/StaticNode2D2" index="1"]
z_index = -4 z_index = -4
material = SubResource("CanvasItemMaterial_wt525")
position = Vector2(40, 24) position = Vector2(40, 24)
texture = ExtResource("12_md5xh") texture = ExtResource("12_md5xh")
offset = Vector2(-48, -64) offset = Vector2(-48, -64)
@ -559,7 +589,7 @@ z_index = 3
position = Vector2(710, 603) position = Vector2(710, 603)
[node name="Sprite2D" type="Sprite2D" parent="Props/Static@Node2D3" index="0"] [node name="Sprite2D" type="Sprite2D" parent="Props/Static@Node2D3" index="0"]
material = SubResource("CanvasItemMaterial_wt525") material = SubResource("CanvasItemMaterial_txrwk")
position = Vector2(64, 56) position = Vector2(64, 56)
texture = ExtResource("11_wjfe8") texture = ExtResource("11_wjfe8")
offset = Vector2(-48, -64) offset = Vector2(-48, -64)
@ -682,6 +712,15 @@ explosiveness = 0.2
randomness = 0.5 randomness = 0.5
fixed_fps = 12 fixed_fps = 12
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="Props" index="27"]
position = Vector2(576, 504)
stream = ExtResource("26_2g1h3")
volume_db = -4.0
autoplay = true
max_distance = 140.0
attenuation = 0.5
bus = &"Ambient"
[node name="ArenaEntrance" parent="Entities" index="0" instance=ExtResource("20_tcd0x")] [node name="ArenaEntrance" parent="Entities" index="0" instance=ExtResource("20_tcd0x")]
z_index = -1 z_index = -1
position = Vector2(576, 416) position = Vector2(576, 416)
@ -716,55 +755,55 @@ position = Vector2(256, -9)
position = Vector2(80, 373) position = Vector2(80, 373)
[node name="Centurion" parent="Entities" index="8" instance=ExtResource("30_qfl2k")] [node name="Centurion" parent="Entities" index="8" instance=ExtResource("30_qfl2k")]
material = SubResource("ShaderMaterial_mg83a") material = SubResource("ShaderMaterial_rmd68")
position = Vector2(-360, 31) position = Vector2(-360, 31)
[node name="Centurion2" parent="Entities" index="9" instance=ExtResource("30_qfl2k")] [node name="Centurion2" parent="Entities" index="9" instance=ExtResource("30_qfl2k")]
material = SubResource("ShaderMaterial_elrp0") material = SubResource("ShaderMaterial_mfl5e")
position = Vector2(-224, 131) position = Vector2(-224, 131)
[node name="Centurion3" parent="Entities" index="10" instance=ExtResource("30_qfl2k")] [node name="Centurion3" parent="Entities" index="10" instance=ExtResource("30_qfl2k")]
material = SubResource("ShaderMaterial_7olcb") material = SubResource("ShaderMaterial_5dit0")
position = Vector2(-280, 411) position = Vector2(-280, 411)
[node name="Centurion4" parent="Entities" index="11" instance=ExtResource("30_qfl2k")] [node name="Centurion4" parent="Entities" index="11" instance=ExtResource("30_qfl2k")]
material = SubResource("ShaderMaterial_d2b1c") material = SubResource("ShaderMaterial_s1isy")
position = Vector2(-232, 728) position = Vector2(-232, 728)
[node name="Legionary" parent="Entities" index="12" instance=ExtResource("27_84gw4")] [node name="Legionary" parent="Entities" index="12" instance=ExtResource("27_84gw4")]
material = SubResource("ShaderMaterial_3qqeq") material = SubResource("ShaderMaterial_57t45")
position = Vector2(-214, 72) position = Vector2(-214, 72)
[node name="Legionary2" parent="Entities" index="13" instance=ExtResource("27_84gw4")] [node name="Legionary2" parent="Entities" index="13" instance=ExtResource("27_84gw4")]
material = SubResource("ShaderMaterial_u0yfp") material = SubResource("ShaderMaterial_2s5o2")
position = Vector2(-496, 15) position = Vector2(-496, 15)
[node name="Legionary3" parent="Entities" index="14" instance=ExtResource("27_84gw4")] [node name="Legionary3" parent="Entities" index="14" instance=ExtResource("27_84gw4")]
material = SubResource("ShaderMaterial_lxojq") material = SubResource("ShaderMaterial_hgfsn")
position = Vector2(-384, 118) position = Vector2(-384, 118)
[node name="Legionary4" parent="Entities" index="15" instance=ExtResource("27_84gw4")] [node name="Legionary4" parent="Entities" index="15" instance=ExtResource("27_84gw4")]
material = SubResource("ShaderMaterial_6i24g") material = SubResource("ShaderMaterial_8o8wb")
position = Vector2(-300, 384) position = Vector2(-300, 384)
[node name="Legionary5" parent="Entities" index="16" instance=ExtResource("27_84gw4")] [node name="Legionary5" parent="Entities" index="16" instance=ExtResource("27_84gw4")]
material = SubResource("ShaderMaterial_o80y1") material = SubResource("ShaderMaterial_nnd4x")
position = Vector2(-152, 728) position = Vector2(-152, 728)
[node name="Legionary6" parent="Entities" index="17" instance=ExtResource("27_84gw4")] [node name="Legionary6" parent="Entities" index="17" instance=ExtResource("27_84gw4")]
material = SubResource("ShaderMaterial_bc5nr") material = SubResource("ShaderMaterial_muryx")
position = Vector2(-258, 455) position = Vector2(-258, 455)
[node name="Legionary7" parent="Entities" index="18" instance=ExtResource("27_84gw4")] [node name="Legionary7" parent="Entities" index="18" instance=ExtResource("27_84gw4")]
material = SubResource("ShaderMaterial_wcyyo") material = SubResource("ShaderMaterial_2qvkn")
position = Vector2(-556, 402) position = Vector2(-556, 402)
[node name="Legionary8" parent="Entities" index="19" instance=ExtResource("27_84gw4")] [node name="Legionary8" parent="Entities" index="19" instance=ExtResource("27_84gw4")]
material = SubResource("ShaderMaterial_gnvby") material = SubResource("ShaderMaterial_o7meu")
position = Vector2(-404, 505) position = Vector2(-404, 505)
[node name="Cultist" parent="Entities" index="20" instance=ExtResource("30_xj4yo")] [node name="Cultist" parent="Entities" index="20" instance=ExtResource("30_xj4yo")]
material = SubResource("ShaderMaterial_8o4l7") material = SubResource("ShaderMaterial_52xin")
position = Vector2(191, 567) position = Vector2(191, 567)
[node name="CameraBounds" parent="Areas" index="0" instance=ExtResource("33_e4gty")] [node name="CameraBounds" parent="Areas" index="0" instance=ExtResource("33_e4gty")]

View File

@ -0,0 +1,43 @@
// original wind shader from https://github.com/Maujoe/godot-simple-wind-shader-2d/tree/master/assets/maujoe.simple_wind_shader_2d
// original script modified by HungryProton so that the assets are moving differently : https://pastebin.com/VL3AfV8D
//
// speed - The speed of the wind movement.
// minStrength - The minimal strength of the wind movement.
// maxStrength - The maximal strength of the wind movement.
// strengthScale - Scalefactor for the wind strength.
// interval - The time between minimal and maximal strength changes.
// detail - The detail (number of waves) of the wind movement.
// distortion - The strength of geometry distortion.
// heightOffset - The height where the wind begins to move. By default 0.0.
shader_type canvas_item;
render_mode blend_mix;
// Wind settings.
uniform float speed = 1.0;
uniform float minStrength : hint_range(0.0, 1.0) = 0.05;
uniform float maxStrength : hint_range(0.0, 1.0) = 0.01;
uniform float strengthScale = 100.0;
uniform float interval = 3.5;
uniform float detail = 1.0;
uniform float distortion : hint_range(0.0, 1.0);
uniform float heightOffset : hint_range(0.0, 1.0);
// With the offset value, you can if you want different moves for each asset. Just put a random value (1, 2, 3) in the editor. Don't forget to mark the material as unique if you use this
uniform float offset = 0;
float getWind(vec2 vertex, vec2 uv, float time){
float diff = pow(maxStrength - minStrength, 2.0);
float strength = clamp(minStrength + diff + sin(time / interval) * diff, minStrength, maxStrength) * strengthScale;
float wind = (sin(time) + cos(time * detail)) * strength * max(0.0, (1.0-uv.y) - heightOffset);
return wind;
}
void vertex() {
vec4 pos = MODEL_MATRIX * vec4(0.0, 0.0, 0.0, 1.0);
float time = TIME * speed + offset;
//float time = TIME * speed + pos.x * pos.y ; not working when moving...
VERTEX.x += getWind(VERTEX.xy, UV, time);
}

View File

@ -0,0 +1,43 @@
// original wind shader from https://github.com/Maujoe/godot-simple-wind-shader-2d/tree/master/assets/maujoe.simple_wind_shader_2d
// original script modified by HungryProton so that the assets are moving differently : https://pastebin.com/VL3AfV8D
//
// speed - The speed of the wind movement.
// minStrength - The minimal strength of the wind movement.
// maxStrength - The maximal strength of the wind movement.
// strengthScale - Scalefactor for the wind strength.
// interval - The time between minimal and maximal strength changes.
// detail - The detail (number of waves) of the wind movement.
// distortion - The strength of geometry distortion.
// heightOffset - The height where the wind begins to move. By default 0.0.
shader_type canvas_item;
render_mode unshaded;
// Wind settings.
uniform float speed = 1.0;
uniform float minStrength : hint_range(0.0, 1.0) = 0.05;
uniform float maxStrength : hint_range(0.0, 1.0) = 0.01;
uniform float strengthScale = 100.0;
uniform float interval = 3.5;
uniform float detail = 1.0;
uniform float distortion : hint_range(0.0, 1.0);
uniform float heightOffset : hint_range(0.0, 1.0);
// With the offset value, you can if you want different moves for each asset. Just put a random value (1, 2, 3) in the editor. Don't forget to mark the material as unique if you use this
uniform float offset = 0;
float getWind(vec2 vertex, vec2 uv, float time){
float diff = pow(maxStrength - minStrength, 2.0);
float strength = clamp(minStrength + diff + sin(time / interval) * diff, minStrength, maxStrength) * strengthScale;
float wind = (sin(time) + cos(time * detail)) * strength * max(0.0, (1.0-uv.y) - heightOffset);
return wind;
}
void vertex() {
vec4 pos = MODEL_MATRIX * vec4(0.0, 0.0, 0.0, 1.0);
float time = TIME * speed + offset;
//float time = TIME * speed + pos.x * pos.y ; not working when moving...
VERTEX.x += getWind(VERTEX.xy, UV, time);
}