Updated shaders

Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
2021-06-27 19:28:34 +02:00
parent 52fdd653ef
commit 2cfcb0b4a9
2 changed files with 10 additions and 11 deletions
+3 -3
View File
@@ -72,9 +72,9 @@ void main()
mat3 model = transpose(inverse(mat3(PushConstants.render_matrix)));
vec3 T = normalize(vec3(vertex.tangent));
vec3 N = normalize(vec3(vertex.normal));
vec3 B = normalize(vec3(vertex.bitangent));
vec3 T = normalize(model * vec3(vertex.tangent));
vec3 N = normalize(model * vec3(vertex.normal));
vec3 B = normalize(model * vec3(vertex.bitangent));
/* T = normalize(T - dot(T, N) * N); // Re-orthoganize T with respect to N */
/* vec3 B = normalize(cross(N, T)); */
TBN = mat3(T, B, N);