• Advertisement
Sign in to follow this  

Trying to increase fps in games (D3D9)

This topic is 1328 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What i am doing is injecting a dll in to the game process and hooking DrawIndexPrimitive, inside the hooked function i am doing
 
if(primcount == 543 && numvertices == 606) //tress
{
//dont render, skip the draw
}
else
{
return device->dip(params);
 
why wouldnt this increase the fps on screen?
}
Edited by Anddos

Share this post


Link to post
Share on other sites
Advertisement

Because that's not the bottleneck, so it has no effect on how long rendering takes. What are you actually trying to do?

Share this post


Link to post
Share on other sites

I am trying to remove tress from a game thats all over the place so i get better fps

Share this post


Link to post
Share on other sites

- Does your code actually work? (i.e. does it remove the trees? Does every tree have exactly that primitive and vertex count)

 

 

- What kind of profiling have you done to determine that drawing trees is the bottleneck?

Share this post


Link to post
Share on other sites

it removes the tree's but the fps stays the same,its obvious the trees are the bottleneck as there rendering far out in the distance with no view frustrum culling which is a waste of processing power imo.

Share this post


Link to post
Share on other sites

It's obvious that you're mistaken though, or it would've worked.

Share this post


Link to post
Share on other sites

why wouldnt this increase the fps on screen?

Maybe the frame-rate is capped via v-sync.
Maybe the trees really aren’t that difficult to draw and aren’t a bottleneck.

Before you “optimize” something, make sure it is actually consuming a worthwhile amount of time.


L. Spiro

Share this post


Link to post
Share on other sites

which is a waste of processing power imo.

 

This is the problem.

 

You're using opinion to decide what you think is or isn't a "waste".  You should be basing decisons on actual verified and verifiable measurements instead.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement