broken_seals_roguelike/game/shaders/1_standard_shader.tres

30 lines
626 B
Plaintext

[gd_resource type="Shader" format=2]
[resource]
code = "shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_back,specular_disabled,vertex_lighting;
uniform vec4 albedo : hint_color;
uniform sampler2D texture_albedo : hint_albedo;
void fragment() {
vec2 base_uv = UV;
vec2 base_uv2 = UV2;
vec4 albedo_tex = texture(texture_albedo, base_uv);
float ratio = COLOR.a;
if (ratio < 0.998) {
vec4 albedo_tex2 = texture(texture_albedo, base_uv2);
albedo_tex *= ratio;
albedo_tex2 *= 1.0 - ratio;
albedo_tex += albedo_tex2;
}
albedo_tex *= COLOR;
ALBEDO = albedo.rgb * albedo_tex.rgb;
}
"