I'm trying to develop an mobile game, and I'm having trouble with transparency.
My shader looks like this
shader_type spatial;
render_mode depth_draw_alpha_prepass;
uniform sampler2D albedo;
uniform sampler2D specular;
uniform sampler2D roughness;
void fragment() {
vec4 albedo_alpha = texture(albedo, UV);
ALBEDO = albedo_alpha.rgb;
ALPHA = albedo_alpha.a;
SPECULAR = texture(specular, UV).r;
ROUGHNESS = texture(roughness, UV).r;
}
This was tested on a Samsung Galaxy S10+. I'm new to mobile development