Quote:Original post by dpadam450
Quote:Honestly, I have no idea half of those terms mean. The code is there, could you check for me?
Sounds like you copy and pasted code and expect to be a pro at openGL. Try updating the position uniform that you have each frame. Allow yourself to move the that position and draw it at run time.
Actually. That's the exact oposite of the truth. First I wrote what I understood about lamberts cosine law from physics, it worked, yay! Then, I started reading through tutorials about per-pixel lights and point lights. I implemented it as I understood it from those tutorials. Obviously, I've done somthing really wrong, because it's not working :D. If I had of copy-pasted it, wouldn't it have worked?
Anyway. Yes, I'm using homogenous co-ordinates, if you read the code you would have realised I'm not even using any fixed function stuff, I can't! This code is targetting ES 2.0, I'm going to have to replace the matricies with my own, because all matrix math is out of ES 2.0, that's why I'm multiplying matrices individually. Anyway, multiplication law, it dosen't make a difference what order I do it in.
The problem is in the multiplication of the matrices, while I understand physics concepts quite well, I'm not so great on maths. I need to pass the light in world-space.