Skip to content

Commit

Permalink
Tweak Engulf Effect (#5017)
Browse files Browse the repository at this point in the history
* Tweak Engulf Effect

* Format
  • Loading branch information
GameDungeon committed Apr 11, 2024
1 parent e9ffec0 commit 218345b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions shaders/EngulfEffect.gdshader
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ uniform float movementWigglyNess = 1.f;

uniform float waviness = 20.f;
uniform float waveSpeed = 15.f;
uniform float waveCutoff = 0.4f;

uniform float fade = 0.f;

Expand All @@ -29,5 +28,5 @@ void fragment() {
vec3 final = vec3(waves) * tint;

ALBEDO = final;
ALPHA = round(waves - waveCutoff) * (1.f - UV.y) * fade;
ALPHA = waves * (1.f - UV.y) * fade;
}
2 changes: 1 addition & 1 deletion simulation_parameters/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public static class Constants
public const float MEMBRANE_WAVE_HEIGHT_DEPENDENCE_ON_SIZE = 0.3f;
public const float MEMBRANE_WAVE_HEIGHT_MULTIPLIER = 0.025f;
public const float MEMBRANE_WAVE_HEIGHT_MULTIPLIER_CELL_WALL = 0.015f;
public const float MEMBRANE_ENGULF_ANIMATION_DISTANCE = 1.0f;
public const float MEMBRANE_ENGULF_ANIMATION_DISTANCE = 1.25f;

/// <summary>
/// BASE MOVEMENT ATP cost. Cancels out a little bit more then one cytoplasm's glycolysis
Expand Down
2 changes: 1 addition & 1 deletion src/microbe_stage/Membrane.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public partial class Membrane : MeshInstance3D
private float sizeWigglyNessDampeningFactor = 0.22f;
private float movementWigglyNess = 1.0f;
private float sizeMovementWigglyNessDampeningFactor = 0.32f;
private double engulfFade = 1.0f;
private double engulfFade;

/// <summary>
/// When true the material properties need to be reapplied
Expand Down
1 change: 0 additions & 1 deletion src/microbe_stage/Membrane.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ shader_parameter/wigglyNess = 1.0
shader_parameter/movementWigglyNess = 1.0
shader_parameter/waviness = 20.0
shader_parameter/waveSpeed = 15.0
shader_parameter/waveCutoff = 0.4
shader_parameter/fade = 0.0
shader_parameter/tint = Color(0, 0.55, 0.8, 1)

Expand Down

0 comments on commit 218345b

Please sign in to comment.