Hi,
I’m trying to figure out what’s killing my FPS. I have a I7-2700k CPU, 16 gig ram, EVGA GTX 950 ti, 128 GB ssd, and huge HD. I’m not sure why the framerate isn’t about 60 fps.
Test Video
youtube.com/watch?v=VlugiYVOZxQ
Other
youtube.com/watch?v=r4gcA_GKlQw
I’m using these base code for this scene. I disabled all rigidbody and collisions since this is pretty much pre-defined.
Vivienne
[code]
void MainMenuView::CreateManualScene(void)
{
// Update Renderer
AnimationManager * pAnimationManager = g_pApp->GetGameLogic()->GetAnimationsManager();
// Update renderer setting decrease rendering quality and increase frame rate
m_pRenderer->SetShadowQuality(SHADOWQUALITY_SIMPLE_16BIT);
m_pRenderer->SetShadowMapSize(1024);
m_pRenderer->SetDynamicInstancing(true);
m_pRenderer->SetTextureQuality(QUALITY_MEDIUM);
m_pRenderer->SetMaterialQuality(QUALITY_MEDIUM);
// Update scene
m_pScene = SharedPtr<Scene>(new Scene(context_));
// Reset Scene for Applications Manager
pAnimationManager->SetScene(m_pScene);
// Add octree
m_pScene->CreateComponent<Octree>();
// Load a demo file
LevelManager* pLevelManager = g_pApp->GetGameLogic()->GetLevelManager();
pLevelManager->LoadLevel(m_pScene, "Levels/LoginScene1.xml", false);
// Create a temporary Vector
PODVector<CameraComponent *> Cameras;
// Get scene camera components
m_pScene->GetComponents(Cameras, "CameraComponent");
// Create a iternator
PODVector<CameraComponent *>::Iterator thisComponent;
// Loop through each component
for(thisComponent = Cameras.Begin(); thisComponent!=Cameras.End(); ++thisComponent)
{
if((*thisComponent)->GetDefault() == true)
{
// Get the Camera Component Node
m_pCameraNode = (*thisComponent)->GetNode();
// Set new Viewport using CameraComponent
m_pViewport = new Viewport(context_, m_pScene, m_pCameraNode->GetComponent<CameraComponent>());
break;
}
}
// If Camera Node is not Null then there must have been a default camera
if(m_pCameraNode==NULL)
{
// Create a scene node for the camera, which we will move around
// The camera will use default settings (1000 far clip distance, 45 degrees FOV, set aspect ratio automatically)
m_pCameraNode = m_pScene->CreateChild(String("Camera").ToHash(), CreateMode::LOCAL);
m_pCameraNode->CreateComponent<Camera>();
// Set Position
m_pCameraNode->SetPosition(Vector3(-400.0f,60.0f,200.0f));
// Test Look at
m_pCameraNode->LookAt(Vector3(0.0f,0.0f,0.0f));
m_pCameraNode->GetComponent<Camera>()->SetFarClip(2000.0);
// Set new Viewport using Camera
m_pViewport = new Viewport(context_, m_pScene, m_pCameraNode->GetComponent<Camera>());
}
// Set Viewport
m_pRenderer->SetViewport(0, m_pViewport);
SharedPtr<RenderPath> m_pFXRenderPath= m_pViewport->GetRenderPath()->Clone();
m_pFXRenderPath->Append(g_pApp->GetConstantResCache()->GetResource<XMLFile>("PostProcess/Bloom.xml"));
m_pFXRenderPath->Append(g_pApp->GetConstantResCache()->GetResource<XMLFile>("PostProcess/FXAA3.xml"));
// Make the bloom mixing parameter more pronounced
m_pFXRenderPath->SetShaderParameter("BloomMix", Vector2(0.98f, 0.02f));
m_pFXRenderPath->SetEnabled("Bloom", true);
m_pFXRenderPath->SetEnabled("FXAA3", true);
// Set active path
m_pViewport->SetRenderPath(m_pFXRenderPath);
// Create a temporary Vector
PODVector<AnimationControllerComponent *> AnimationControllers;
// Get scene AnimationController components
m_pScene->GetComponents(AnimationControllers, "AnimationControllerComponent");
// Create a iternator
PODVector<AnimationControllerComponent *>::Iterator thisControllerComponent;
// Loop through each component
for(thisControllerComponent = AnimationControllers.Begin(); thisControllerComponent!=AnimationControllers.End(); ++thisControllerComponent)
{
pAnimationManager->AddAnimationController(*thisControllerComponent);
}
return;[/code]
}