|
@@ -266,6 +266,7 @@
|
|
|
#if defined(NORMALMAP) || defined(PARALLAXMAP)
|
|
|
vec3 tan = normalize(wTangent.xyz);
|
|
|
mat3 tbnMat = mat3(tan, wTangent.w * cross( surface.geometryNormal, tan), surface.geometryNormal);
|
|
|
+ surface.tbnMat = tbnMat;
|
|
|
#endif
|
|
|
|
|
|
vec2 newTexCoord;
|
|
@@ -338,7 +339,7 @@
|
|
|
#endif
|
|
|
surface.normal = normalize(tbnMat * normal);
|
|
|
#else
|
|
|
- surface.normal = normal;
|
|
|
+ surface.normal = surface.geometryNormal;
|
|
|
#endif
|
|
|
|
|
|
//spec gloss tex reads:
|
|
@@ -589,4 +590,4 @@
|
|
|
#endif
|
|
|
|
|
|
|
|
|
-#endif
|
|
|
+#endif
|