File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,12 @@ Vertex
7272 output.vColor = input.vColor;
7373 output.vTexCoord = input.vTexCoord * float2( -1, 1 );
7474 output.vNormalWS = input.vNormal;
75-
75+
7676 // Calculate TBN matrix for lighting
77- float3 T = normalize(mul(float4(input.vTangent, 0.0), model_matrix ).xyz);
78- float3 B = normalize(mul(float4(input.vBitangent, 0.0), model_matrix ).xyz);
79- float3 N = normalize(mul(float4(input.vNormal, 0.0), model_matrix ).xyz);
80- float3x3 TBN = transpose( float3x3(T, B, N) );
77+ float3 T = normalize(mul(model_matrix, float4(input.vTangent, 0.0)).xyz);
78+ float3 B = normalize(mul(model_matrix, float4(input.vBitangent, 0.0)).xyz);
79+ float3 N = normalize(mul(model_matrix, float4(input.vNormal, 0.0)).xyz);
80+ float3x3 TBN = float3x3(T, B, N);
8181
8282 // Transform into tangent space
8383 for (int i = 0; i < 4; i++)
You can’t perform that action at this time.
0 commit comments