Lights: Add a metric to measure light count pressure in a scene.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14802 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -1397,7 +1397,7 @@ void IrrDriver::displayFPS()
|
||||
{
|
||||
gui::IGUIFont* font = GUIEngine::getFont();
|
||||
|
||||
irr_driver->getVideoDriver()->draw2DRectangle(video::SColor(150, 96, 74, 196),core::rect< s32 >(75,0,800,50),NULL);
|
||||
irr_driver->getVideoDriver()->draw2DRectangle(video::SColor(150, 96, 74, 196),core::rect< s32 >(75,0,900,50),NULL);
|
||||
|
||||
// We will let pass some time to let things settle before trusting FPS counter
|
||||
// even if we also ignore fps = 1, which tends to happen in first checks
|
||||
@@ -1450,8 +1450,8 @@ void IrrDriver::displayFPS()
|
||||
|
||||
if (UserConfigParams::m_artist_debug_mode)
|
||||
{
|
||||
sprintf(buffer, "FPS: %i/%i/%i - %.2f/%.2f/%.2f KTris",
|
||||
min, fps, max, low, kilotris, high);
|
||||
sprintf(buffer, "FPS: %i/%i/%i - %.2f/%.2f/%.2f KTris - LightDst : ~%d",
|
||||
min, fps, max, low, kilotris, high, m_last_light_bucket_distance);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -149,6 +149,7 @@ private:
|
||||
bool m_shadowviz;
|
||||
bool m_lightviz;
|
||||
bool m_distortviz;
|
||||
unsigned m_last_light_bucket_distance;
|
||||
u32 m_renderpass;
|
||||
u32 m_lensflare_query;
|
||||
scene::IMeshSceneNode *m_sun_interposer;
|
||||
@@ -270,6 +271,7 @@ public:
|
||||
|
||||
void showPointer();
|
||||
void hidePointer();
|
||||
void setLastLightBucketDistance(unsigned d) { m_last_light_bucket_distance = d; }
|
||||
bool isPointerShown() const { return m_pointer_shown; }
|
||||
core::position2di getMouseLocation();
|
||||
|
||||
|
||||
@@ -734,8 +734,10 @@ void IrrDriver::renderLights(const core::aabbox3df& cambox,
|
||||
accumulatedLightColor.push_back(0.);
|
||||
accumulatedLightEnergy.push_back(LN->getEnergy());
|
||||
}
|
||||
if (lightnum > MAXLIGHT)
|
||||
if (lightnum > MAXLIGHT) {
|
||||
irr_driver->setLastLightBucketDistance(i * 10);
|
||||
break;
|
||||
}
|
||||
}
|
||||
LightNode::renderLightSet(accumulatedLightPos, accumulatedLightColor, accumulatedLightEnergy);
|
||||
// Handle SSAO
|
||||
|
||||
Reference in New Issue
Block a user