Hi…,
in Godot 4.5 my shader material gets black interferences, when I use more than one light. What is going on? I could increase roughness over 0.4 to prevent this problem, but I need a roughness of 0.0, to get nice reflections. Below is my simple shader code.
Any ideas, how to solve this?
Thanks
Mike
shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_burley, specular_schlick_ggx;
uniform sampler2D texture_albedo : source_color, filter_linear_mipmap, repeat_enable;
uniform sampler2D texture_mixmap : hint_default_white, filter_linear_mipmap, repeat_enable;
uniform sampler2D texture_normal : hint_normal, filter_linear_mipmap, repeat_enable;
uniform float specular : hint_range(0.0, 1.0, 0.01) = 0.5;
uniform float metallic : hint_range(0.0, 1.0, 0.01) = 1.0;
void fragment() {
// Color
ALBEDO = texture(texture_albedo, UV).rgb;
// Ambient Occlusion, red channel
AO = texture(texture_mixmap, UV).r;
// Roughness, green channel
ROUGHNESS = texture(texture_mixmap, UV).g;
// Metallic, blue channel
METALLIC = texture(texture_mixmap, UV).b * metallic;
// Specular
SPECULAR = specular;
// Normal Map
NORMAL_MAP = texture(texture_normal, UV).rgb;
}