Hello!
For now, I used OGL in fixed function mode. But now I want to learn the programmable pipeline now.
I tried to implement a simple diffuse - specular lighting shader from http://www.lighthouse3d.com/tutorials/glsl-core-tutorial/directional-lights-per-pixel/ . But I got wierd results (picture attached)
I uploaded my code to pastebin:
- Rendering: http://pastebin.com/cUDtHcWJ
- Vertex shader: http://pastebin.com/hE8s3KE7
- Fragment shader: http://pastebin.com/pVpr6zhR
And if I move my camera further the object, it gets brighter. Something I had to do with the position right?