17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-30 22:30:28 +01:00

Make the material shaders physically based

This commit is contained in:
2026-10-20 18:39:31 +02:00
parent cf36b24e8d
commit 7d0f76aaa9
20 changed files with 288 additions and 258 deletions

View File

@@ -48,7 +48,7 @@ void main()
vec3 fragnormal = normalize(f_tbn * normalize(normal.xyz));
float reflectivity = param[1].z * texture(normalmap, f_coord).a;
float specularity = (tex_color.r + tex_color.g + tex_color.b) * 0.5;
glossiness = abs(param[1].w);
legacy_gloss();
fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, 1.0);
vec4 color = vec4(apply_fog(fragcolor), tex_color.a * alpha_mult);