Performance Optimizes

Small bug fixes
Implemented KRVector4
This commit is contained in:
2013-04-24 12:48:55 -07:00
parent 0d7cb8b315
commit e6207fbb83
29 changed files with 1115 additions and 269 deletions

View File

@@ -62,9 +62,7 @@ void KRPointLight::render(KRCamera *pCamera, std::vector<KRLight *> &lights, con
sphereModelMatrix.scale(influence_radius);
sphereModelMatrix.translate(light_position.x, light_position.y, light_position.z);
float lod_coverage = getBounds().coverage(viewport.getViewProjectionMatrix(), viewport.getSize()); // This also checks the view frustrum culling
if(lod_coverage > 0) { // Cull out any lights not within the view frustrum
if(viewport.visible(getBounds())) { // Cull out any lights not within the view frustrum
KRVector3 view_light_position = KRMat4::Dot(viewport.getViewMatrix(), light_position);