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

fixes for gles mode

This commit is contained in:
milek7
2019-09-27 13:26:00 +02:00
parent cebf5de86a
commit a3abdeac63
6 changed files with 31 additions and 19 deletions

View File

@@ -47,7 +47,7 @@ void main()
discard;
normal.xy = (texture(normalmap, f_coord).rg * 2.0 - 1.0);
normal.z = sqrt(1 - clamp((dot(normal.xy, normal.xy)), 0.0, 1.0));
normal.z = sqrt(1.0 - clamp((dot(normal.xy, normal.xy)), 0.0, 1.0));
normal = normalize(f_tbn * normalize(normal.xyz));
//vec3 normal = normalize(f_tbn * normalize(texture(normalmap, f_coord).rgb * 2.0 - 1.0));
vec3 refvec = reflect(f_pos.xyz, normal);