Fixed the shader
Stupid matrices.
This commit is contained in:
parent
5405063f28
commit
b9360cee57
@ -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;
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user