Starting to add lights, not working atm
Creation and addition of lightbuffer is working
Added lighthelperfiles
PointLight code implents and runs, however, it does not give any effect
Removed jitter on triangles and cleaned up some code
Added link
Added code for direction light (not giving correct results) and also have code for point light (does not work at all) So not really working...
Changed my code slightly after example, haven't had the time to try the new light code out yet though
Something's working
Now it works quite nicely. Need to use some more OO on this. Make camera non singular. And put some better systems for light etc up.
Right hand disabled. Added fix that if rays misses everything on an iteration it does not continue checking
It seems to work very good now, shrunk the triangles to see if the flicker remained, it seemed to help. So i'm hopeful this will resolve itself in the future
Changed the camera to be a safer and nicer looking singleton. Do I even want the camera as singleton(?) why did I do that from the beginning?
Trying to fix why triangles always have color, even though ambient is set to 0.0f
Fixed some logic faults, now it theres something wrong with vector to light code
Found problem , triangles always returns hit and always says its the first one that's closest. Even though there should be no hit and not always the first one in the array to be closest. This can be tracked down to the function that checks if hit any triangle and calculates the closest one OR the TriangleCollision function
Everything now works. Things aren't lit if they should not be. It all came down to a 'avrundningsfel'. Time to clean up code and implement movin lights. yeayea
It works. However, it seems to be a logical error in the code. Read up on raytracing on the net plox
Redesigned the distance check with interfaces. Also fixed so that objects only are rendered if they're are in LOS of the light. Multiple lights does hoever not work, yet.
Fixed some bugs with camera etc. It almost works, however, I now know how to program a recursive raytracing algoritm. Starting on that.