Skip to content

Commit

Permalink
You idiot
Browse files Browse the repository at this point in the history
  • Loading branch information
xezno committed Dec 23, 2024
1 parent 5731459 commit a2017c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Content/core/shaders/pbr.mshdr
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ Vertex
output.vColor = input.vColor;
output.vTexCoord = input.vTexCoord * float2( -1, 1 );
output.vNormalWS = input.vNormal;

// Calculate TBN matrix for lighting
float3 T = normalize(mul(float4(input.vTangent, 0.0), model_matrix).xyz);
float3 B = normalize(mul(float4(input.vBitangent, 0.0), model_matrix).xyz);
float3 N = normalize(mul(float4(input.vNormal, 0.0), model_matrix).xyz);
float3x3 TBN = transpose(float3x3(T, B, N));
float3 T = normalize(mul(model_matrix, float4(input.vTangent, 0.0)).xyz);
float3 B = normalize(mul(model_matrix, float4(input.vBitangent, 0.0)).xyz);
float3 N = normalize(mul(model_matrix, float4(input.vNormal, 0.0)).xyz);
float3x3 TBN = float3x3(T, B, N);

// Transform into tangent space
for (int i = 0; i < 4; i++)
Expand Down

0 comments on commit a2017c5

Please sign in to comment.