diff --git a/Entities/DynamicDoorSwitch.cs b/Entities/DynamicDoorSwitch.cs index 89e6ad4..b98984b 100644 --- a/Entities/DynamicDoorSwitch.cs +++ b/Entities/DynamicDoorSwitch.cs @@ -60,9 +60,6 @@ public partial class DynamicDoorSwitch : StaticBody2D RefreshMapState(newState); GD.Print($"Map state \"{MapStateKey}\" {oldState} -> {newState}"); - - //var a = _animPlayer.CurrentAnimation; - //GetNode(nodePath).SetProcess(true); } public void SetAnimations(bool isEnabled) diff --git a/Shaders/Godrays.gdshader b/Shaders/Godrays.gdshader index 727a361..ade216e 100644 --- a/Shaders/Godrays.gdshader +++ b/Shaders/Godrays.gdshader @@ -14,7 +14,7 @@ uniform float angle : hint_range(-5, 5) = -0.3; uniform float position = -0.2; uniform float spread : hint_range(0.0, 1.0) = 0.5; uniform float cutoff : hint_range(-1.0, 1.0) = 0.1; -uniform float falloff : hint_range(0.0, 1.0) = 0.2; +uniform float falloff : hint_range(0.0, 2.0) = 0.2; uniform float edge_fade : hint_range(0.0, 1.0) = 0.15; uniform float speed = 1.0; @@ -29,8 +29,9 @@ uniform float seed = 5.0; // Random and noise functions from Book of Shader's chapter on Noise. float random(vec2 _uv) { + _uv += min(TIME,0.0); return fract(sin(dot(_uv.xy, - vec2(12.9898, 78.233))) * + vec2(12.9898, 78.233))) * 43758.5453123); } @@ -65,6 +66,15 @@ vec4 screen(vec4 base, vec4 blend){ return 1.0 - (1.0 - base) * (1.0 - blend); } +float custom_smooth_step(float limit1, float limit2, float x) { + if (x <= limit1) { + return 0.0; + } else if (x >= limit2) { + return 1.0; + } + return (limit1 + x) / (limit1 + limit2); +} + void fragment() { @@ -93,7 +103,7 @@ void fragment() } // Fade out edges - rays *= smoothstep(0.0, falloff, (1.0 - UV.y)); // Bottom + rays *= custom_smooth_step(0.0, falloff, (1.0 - UV.y)); // Bottom rays *= smoothstep(0.0 + cutoff, edge_fade + cutoff, transformed_uv.x); // Left rays *= smoothstep(0.0 + cutoff, edge_fade + cutoff, 1.0 - transformed_uv.x); // Right diff --git a/Shaders/GodraysCompatible.gdshader b/Shaders/GodraysCompatible.gdshader index d400b79..b8e5d92 100644 --- a/Shaders/GodraysCompatible.gdshader +++ b/Shaders/GodraysCompatible.gdshader @@ -10,11 +10,11 @@ shader_type canvas_item; uniform vec4 tint_color : source_color; uniform float alpha : hint_range(0.0, 1.0) = 0.75; uniform sampler2D noise_texture : repeat_enable; -uniform float speed : hint_range(0.0, 1.0) = 0.25; -uniform float spread = 1; +uniform float speed : hint_range(0.0, 32.0) = 0.25; +uniform float spread : hint_range(0.0, 1.0) = 1.0; uniform float opposite_ray_mult = 1.0; uniform float negative_intensity = 1.0; -uniform float negative_ray_speed : hint_range(0.0, 1.0) = 0; +uniform float negative_ray_speed : hint_range(0.0, 32.0) = 0; uniform float cutoff : hint_range(0.0, 1.0) = 0; uniform float smooth_cutoff : hint_range(0.0, 1.0) = 0; uniform float y_cutoff : hint_range(0.0, 1.0) = 0; diff --git a/State/Weapon/RangedChargeState.cs b/State/Weapon/RangedChargeState.cs index 947aa67..7101755 100644 --- a/State/Weapon/RangedChargeState.cs +++ b/State/Weapon/RangedChargeState.cs @@ -42,7 +42,6 @@ public partial class RangedChargeState : WeaponState } Weapon.UseDirection = Weapon.Character.Target; - GD.Print(Weapon.UseDirection); return null; } @@ -54,11 +53,9 @@ public partial class RangedChargeState : WeaponState if (progress > 0.5) { - GD.Print("not enough"); return IdleState; } - GD.Print("firing"); FireState.VelocityModifier = (float)(1 - progress); return FireState; }