Explorar o código

fix view dependent problem in normal mapping

romulox_x %!s(int64=11) %!d(string=hai) anos
pai
achega
b479a2c8f0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/gles2/shaders/material.glsl

+ 1 - 1
drivers/gles2/shaders/material.glsl

@@ -306,7 +306,7 @@ void main() {
 #endif
 
 #if defined(ENABLE_TANGENT_INTERP)
-	tangent_interp=normalize(tangent_in);
+	tangent_interp=normalize((modelview * vec4(tangent_in,0.0)).xyz);
 	binormal_interp = normalize( cross(normal_interp,tangent_interp) * binormalf );
 #endif