Skip to main content
GameDev.net gamedev.net
🔒 Locked

Poly count and fps optimization while rendering

Started by Tingle Jun 10, 2010 at 6:30 AM 4 replies 1.1k views
Original Post
Tingle
Tingle
Hi, im trying to optimize fps in a dx app I wrote,
atm im using a high poly model for testing, I get 20 fps when rendering it.

Ive tried
d3ddev->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW);
And setting it to D3DCULL_NONE, there is no fps differnce... How can this be?

Another performance wonder is that if I set my MULTISAMPLEANTIALIAS level to 7... I get a fps increase by 14%, why does my fps benefit from high antialiasing...?

Are there any methods of optimizing what actualy gets rendered to increase fps?
Im only rendering 1 tree, with no shaders or the sorts.
Maby like not drawing triangles that are behind other tri's.
And is there a way to retriev the poly count that is currently being rendered on the screen?
jrh2365
jrh2365
Do you know how many polygons are in your tree?

I'm guessing you know that switching the cull mode to D3DCULL_NONE would most likely hurt performance? I'm thinking that the reason this doesn't affect the fps is that your bottleneck is in a different part of the pipeline, which is not affected by the cull mode.

How are you drawing the tree, are you using D3DXMesh?

-Jeff
Adam_42
Adam_42
Quote:
Original post by Tingle
Hi, im trying to optimize fps in a dx app I wrote,
atm im using a high poly model for testing, I get 20 fps when rendering it.

Ive tried
d3ddev->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW);
And setting it to D3DCULL_NONE, there is no fps differnce... How can this be?

Another performance wonder is that if I set my MULTISAMPLEANTIALIAS level to 7... I get a fps increase by 14%, why does my fps benefit from high antialiasing...?


I expect the limiting performance factor is the number of vertices being transformed, not the per pixel work in rendering the triangles. How many polys are there in that tree?

Quote:
Original post by Tingle
Are there any methods of optimizing what actualy gets rendered to increase fps?
Im only rendering 1 tree, with no shaders or the sorts.
Maby like not drawing triangles that are behind other tri's.


Is hardware vertex processing enabled?

Are you using an index buffer?

Are you doing any frustum culling of objects?

Quote:
Original post by Tingle
And is there a way to retriev the poly count that is currently being rendered on the screen?


You have to add them up yourself. One of the parameters to the DrawPrimitive() functions is the primitive count so it's not difficult.
Tingle
Tingle
yes Im using that, what I dont understand that even without culling and full AA and Multisampling, my fps stays the same with the tree. This makes no sence.

Now I have come to the conclusion that even 'if' my rendering method is doing nothing unneccesery and its optimized the best you can do it. That the fact that the high poly model is being rendered due to the high poly count is why my fps is low... meaning thos 2 things are 2 differnt pools of performance.
But still this would mean that culling and AA MS should increase my fps if I turn it off... and not decrease o.o.

Heres my code riped out with the most important parts regarding this:
http://pastebin.com/P7JJK35q


Edit: the tree has about... 500k polys and im running a geforce 260gtx. Its just a benchmark mesh. But still. fps should be changing if im playing with AA, MS and Culling
Tingle
Tingle
Ah got it, thanks to some people on the irc channel, my problem was where my mesh was being loaded into, the system memory, now I changed it to managed and im running at 60 fps

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.