diff --git a/scenes/interactivity_outline2.gdshader b/scenes/interactivity_outline2.gdshader index 13d24c7..e9432b3 100644 --- a/scenes/interactivity_outline2.gdshader +++ b/scenes/interactivity_outline2.gdshader @@ -13,9 +13,9 @@ void vertex() { /* thanks gdquest */ void fragment() { vec2 size = vec2(width) / vec2(textureSize(albedo_texture, 0)); - + vec4 sprite_color = texture(albedo_texture, UV); - + float alpha = sprite_color.a; alpha += texture(albedo_texture, UV + vec2(0.0, -size.y)).a; alpha += texture(albedo_texture, UV + vec2(size.x, -size.y)).a; @@ -25,7 +25,7 @@ void fragment() { alpha += texture(albedo_texture, UV + vec2(-size.x, size.y)).a; alpha += texture(albedo_texture, UV + vec2(-size.x, 0.0)).a; alpha += texture(albedo_texture, UV + vec2(-size.x, -size.y)).a; - + vec3 final_color = mix(outline_color.rgb, sprite_color.rgb, sprite_color.a); ALBEDO = final_color; ALPHA = clamp(alpha, 0.0, 1.0); diff --git a/src/ingame/player.tscn b/src/ingame/player.tscn index 5c812e5..4a33807 100644 --- a/src/ingame/player.tscn +++ b/src/ingame/player.tscn @@ -42,6 +42,7 @@ shader_parameter/size = 1.24 [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_x7r08"] resource_local_to_scene = true next_pass = SubResource("ShaderMaterial_nch7m") +no_depth_test = true albedo_color = Color(0.0936238, 0.825356, 1, 1) metallic = 0.8 roughness = 0.4