shader fix

This commit is contained in:
milek7
2018-10-17 21:54:03 +02:00
parent b9fbe7452b
commit 455ca1cacf
2 changed files with 2 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ vec3 apply_fog(vec3 color)
vec2 calc_light(vec3 light_dir)
{
#ifdef NORMALMAP
vec3 normal = f_tbn * normalize(texture(normalmap, f_coord).rgb * 2.0 - 1.0);
vec3 normal = normalize(f_tbn * normalize(texture(normalmap, f_coord).rgb * 2.0 - 1.0));
#else
vec3 normal = normalize(f_normal);
#endif

View File

@@ -44,7 +44,7 @@ void main()
if (tex_color.a < opacity)
discard;
vec3 normal = f_tbn * normalize(texture(normalmap, f_coord).rgb * 2.0 - 1.0);
vec3 normal = normalize(f_tbn * normalize(texture(normalmap, f_coord).rgb * 2.0 - 1.0));
vec3 refvec = reflect(f_pos.xyz, normal);
#if ENVMAP_ENABLED
vec3 envcolor = texture(envmap, refvec).rgb;