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;
|
out vec3 normal;
|
||||||
|
|
||||||
void main() {
|
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_pos = vec3(model * vec4(vert_pos, 1.0));
|
||||||
frag_col = col * light_col;
|
frag_col = col * light_col;
|
||||||
normal = mat3(transpose(inverse(model))) * vert_norm;
|
normal = mat3(transpose(inverse(model))) * vert_norm;
|
||||||
|
@ -88,7 +88,7 @@ System::~System() {
|
|||||||
|
|
||||||
void System::run() {
|
void System::run() {
|
||||||
unsigned int lastTime = SDL_GetTicks();
|
unsigned int lastTime = SDL_GetTicks();
|
||||||
cam.setPosition(glm::vec3(4,4,4));
|
cam.setPosition(glm::vec3(8,8,8));
|
||||||
while(running)
|
while(running)
|
||||||
{
|
{
|
||||||
syncInputs();
|
syncInputs();
|
||||||
|
Loading…
Reference in New Issue
Block a user