File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,11 @@ varying vec3 vPosition;
49
49
attribute vec3 aNormal;
50
50
varying vec3 vNormal;
51
51
#endif // PHONG_SHADING
52
- attribute vec3 aTangent;
53
- varying vec3 vTangent;
52
+ attribute vec4 aTangent;
53
+ varying vec4 vTangent;
54
54
varying vec3 vObjectSpacePosition;
55
55
varying vec3 vTangentSpaceLightVector;
56
- varying vec3 vTangentSpaceCameraVector
56
+ varying vec3 vTangentSpaceCameraVector;
57
57
uniform vec3 light_pos; // in object space
58
58
uniform vec3 camera_pos; // in object space
59
59
#endif // NORMALS
@@ -98,7 +98,7 @@ void main()
98
98
vObjectSpacePosition = aPosition.xyz;
99
99
100
100
vec3 n = normalize (vNormal);
101
- vec3 t = normalize (vTangent);
101
+ vec3 t = normalize (vTangent.xyz );
102
102
vec3 b = normalize (cross (n, t)) * aTangent.w;
103
103
104
104
mat3 world_to_tangent_matrix = mat3 (t, b, n);
You can’t perform that action at this time.
0 commit comments