Skip to content

Commit

Permalink
Fixed membranes having holes due to the shader
Browse files Browse the repository at this point in the history
  • Loading branch information
hhyyrylainen committed Mar 14, 2024
1 parent dc039ab commit 6b4749b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shaders/Membrane.gdshader
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ uniform sampler2D normalTexture;
uniform sampler2D dissolveTexture : source_color;
uniform float dissolveValue : hint_range(0, 1);

uniform float healthFraction = 0.5f;
uniform float healthFraction : hint_range(0, 1) = 0.5f;
uniform vec4 tint : source_color = vec4(1, 1, 1, 1);


Expand Down Expand Up @@ -45,8 +45,8 @@ void fragment(){

vec4 dissolveTex = texture(dissolveTexture, UV);

float cutoff = dot(dissolveTex.rgb, vec3(0.6, 0.6, 0.6)) -
float(-0.15 + clamp(dissolveValue, 0, 1));
float cutoff = dot(dissolveTex.rgb, vec3(0.34, 0.34, 0.34)) -
float(-0.482 + clamp(dissolveValue, 0, 1));

ALBEDO = final.rgb;
NORMAL = (INV_VIEW_MATRIX * (MODEL_MATRIX * vec4(normals, 0.0))).xyz;
Expand Down

0 comments on commit 6b4749b

Please sign in to comment.