@plastic-software/three 0.175.6 → 0.175.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -64,30 +64,34 @@ float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
|
|
|
64
64
|
|
|
65
65
|
#ifdef USE_CLEARCOAT_NORMALMAP
|
|
66
66
|
|
|
67
|
-
#
|
|
67
|
+
#if !defined( USE_CLEARCOAT_NORMALMAP_TRIPLANAR )
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
#ifdef USE_TANGENT
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
vec3 bitangent2 = cross(tangent2, normal);
|
|
75
|
-
mat3 tbn2 = mat3(tangent2, bitangent2, normal);
|
|
73
|
+
#elif defined( USE_CLEARCOAT_NORMALMAP_CYLINDRICAL )
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
vec3 tangent2 = normalize(cross(normal, mat3(modelViewMatrix) * transpose(mat3(texture3DMatrix)) * vec3(0, 1, 0)));
|
|
76
|
+
vec3 bitangent2 = cross(tangent2, normal);
|
|
77
|
+
mat3 tbn2 = mat3(tangent2, bitangent2, normal);
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
#elif defined( USE_CLEARCOAT_NORMALMAP_UV )
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
#else
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vUv );
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
#endif
|
|
88
|
+
|
|
89
|
+
#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
|
|
90
|
+
|
|
91
|
+
tbn2[0] *= faceDirection;
|
|
92
|
+
tbn2[1] *= faceDirection;
|
|
88
93
|
|
|
89
|
-
|
|
90
|
-
tbn2[1] *= faceDirection;
|
|
94
|
+
#endif
|
|
91
95
|
|
|
92
96
|
#endif
|
|
93
97
|
|