Skip to content

Commit

Permalink
stash
Browse files Browse the repository at this point in the history
  • Loading branch information
mohlek committed Sep 19, 2021
1 parent f2ed644 commit 2e5b895
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion engine
4 changes: 2 additions & 2 deletions include/shader.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ namespace Shader {
mat3 TBN = transpose(mat3(T, B, N));
vs_out.TBN = TBN;
vec3 lightDir = normalize(vec3(sin(time * 0.001), -1.0, cos(time * 0.001)));
vs_out.tangentLightDir = lightDir;
vec3 lightDir = normalize(vec3(sin(time * 0.001), 1.0, cos(time * 0.001)));
vs_out.tangentLightDir = TBN * lightDir;
vs_out.tangentViewPos = TBN * transpose(view)[3].xyz;
vs_out.tangentFragPos = TBN * vs_out.fragPos;
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ int main(int argc, char** argv) {
uvs[i] = texture[textureIndex[i]];
}

Engine::Buffer<glm::vec2> tangent(faceIndex.size());
Engine::Buffer<glm::vec2> bitangent(faceIndex.size());
Engine::Buffer<glm::vec3> tangent(faceIndex.size());
Engine::Buffer<glm::vec3> bitangent(faceIndex.size());
for (int i = 0; i < faceIndex.size(); i+=1) {
/*
example:
Expand Down

0 comments on commit 2e5b895

Please sign in to comment.