View Full Version : Jerky FPS with shadows

09-08-2002, 03:44 AM
I implemented the well-known shadow-volume + stencil buffering system with the Z-fail check (Carmack's reverse). If I use the homogeneous coordinate to create the long shadow-volumes, the FPS jumps up and down every frame around 2000 FPS (it's a _simple_ test). But if I calculate the volumes on the CPU, it lies steady above 2000 FPS.
It's quite a dumb question, but I wonder why the FPS moves around that much with homogeneous coordinates. The scene is static.

Thnx in advance for your replies! http://www.opengl.org/discussion_boards/ubb/smile.gif

EDIT: Nevermind, I found out the problem... I printed the FPS with printf, visible in the homogeneous version and invisible in the CPU version...

[This message has been edited by coelurus (edited 09-08-2002).]

09-08-2002, 03:14 PM
In addition:
When you run that fast, all kinds of precision problems become apparent in general PC architecture. Some other thread getting a time slice, or just a driver spinning for a while in an interrupt handler, will make your FPS jump all over the place.