martedì 25 agosto 2015

Day 53: Rotations

Today I started by trying to change the bounding box of the spotlighs to a rotating pyramid.
Sadly I noticed a bug I have somewhere: the bounding boxes are rendered with missing faces, like a culling problem or a depth problem, or a model loading problem.
This happens only to models without uvs (which are the ones I use for boxing purposes).
For sphere boxes this leads to no problem, because the faces are so many that everything is covered by the model anyway, but for a cube or a cone, I get whole areas of light cut off.
I'll try to fix it tomorrow and finally finish this lighting stuff.

This evening I decided that it's very bad to declare light directions via a vector, so I left to the user the possibility to pass pitch and yaw in degrees, and then I convert them internally to a vec3 representing the direction.

In the picture I placed the three different lights supported by the engine. From left to right: point, directional and point light shadows.
Tomorrow I'll try to fix the problem, and implement the rotating bounding box, after that, no more lighting.


Nessun commento:

Posta un commento