no depth test in viewmodel item thing
This commit is contained in:
parent
5a4e09d6d1
commit
14d2399163
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user