16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 17:29:18 +02:00

Specular/glossines/metalic mapping added to all fragment shaders

This commit is contained in:
stele
2020-02-23 10:36:15 +01:00
parent fcc8460d88
commit 879f3bb360
15 changed files with 643 additions and 6 deletions

View File

@@ -39,6 +39,7 @@ void main()
vec3 fragnormal = normalize(f_normal);
float reflectivity = param[1].z;
float specularity = (tex_color.r + tex_color.g + tex_color.b) * 0.5;
glossiness = abs(param[1].w);
fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, shadow_tone);
vec4 color = vec4(apply_fog(fragcolor), tex_color.a * alpha_mult);