Fixed the shader

Stupid matrices.
This commit is contained in:
Nicolás A. Ortega Froysa 2018-12-17 17:47:13 +01:00
parent 5405063f28
commit b9360cee57
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ out vec3 frag_col;
out vec3 normal;
void main() {
gl_Position = model * view * proj * vec4(vert_pos, 1);
gl_Position = proj * view * model * vec4(vert_pos, 1);
frag_pos = vec3(model * vec4(vert_pos, 1.0));
frag_col = col * light_col;
normal = mat3(transpose(inverse(model))) * vert_norm;

View File

@ -88,7 +88,7 @@ System::~System() {
void System::run() {
unsigned int lastTime = SDL_GetTicks();
cam.setPosition(glm::vec3(4,4,4));
cam.setPosition(glm::vec3(8,8,8));
while(running)
{
syncInputs();