Player shadow kills framerate - why?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
powerpop
Posts: 171
Joined: Thu Jan 08, 2004 1:39 am
Location: san francisco

Player shadow kills framerate - why?

Post by powerpop »

I turned on the stencil shadow for my md2 player character but it brought my framerate down from 150 to 40 - why is that? - if this is just reality then is there any way for me to do something lighter weight (wondering if the shadow can be an oval shape rather than the real image of the character) - anyways, i would love to put shadows in but not if it dogs my framerate so much

i have a great card - ati radeon 64mb (mobile)
Guest

Post by Guest »

I found the same problem with my geforce 4 ti4400 - the quick hack would be to place an alpha blended billboard underneath your player :)
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Did you use the zfail method? Try if it is ok to switch to zpass, it could be faster.
powerpop
Posts: 171
Joined: Thu Jan 08, 2004 1:39 am
Location: san francisco

Post by powerpop »

i tried zpass but it has the same effect - my frame rate is dropping from 150 to 50 in both cases

(which brings me to something else - i am puzzled in the ping app why my frame rate is only 155 with such a simple scene - i have some testers on older nvidia hardware that are showing 300+ fps but my new mobile radeon is chugging - i wonder if this has to do with me running DX9 ?
SwiftCoder
Posts: 32
Joined: Thu Jan 15, 2004 7:33 pm
Location: Carribean

Post by SwiftCoder »

Shadow volumes are going to drop your frame rate, no two ways about it, there are quite a few calculations going on every frame, but that seems like too much of a drop. It would be interesting to profile the app, and see if it is spending most of its time in the shadow volume code, or in the DX 9 DLL.

My mobile radeon seems to have lousy performance compared to the nvidia cards, and even when compared to the normal radeon cards, and that is on a Mac using OpenGL, so I doubt it is DX 9.
Post Reply