// Shader to take a surface texture using UV1 and a lightmap texture // using UV2 and a normal map and smash em together. 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_normal : hint_roughness_normal, filter_linear_mipmap, repeat_enable; uniform sampler2D texture_lightmap : source_color, filter_linear_mipmap, repeat_enable; void fragment() { vec4 albedo_tex = texture(texture_albedo, UV); vec4 lightmap_tex = texture(texture_lightmap, UV2); ALBEDO = albedo_tex.rgb * lightmap_tex.rgb; NORMAL_MAP = texture(texture_normal, UV).rgb; NORMAL_MAP_DEPTH = 1.0; }