Primary Navigation

Tech Off Post

Single Post Permalink

I think what AndyC is trying to say is that if your framerate is dropping, you should ask yourself what things you could avoid asking DirectX to do and what computations you can do either once at compile time, once during scene startup or once during the object load to avoid doing it every time during the hot-path of the frame renderer.

For example, are any of these polygons entirely occluded by other polygons? In which case you could avoid drawing them.

Are any of your polygons entirely outside of the window's view? If so, don't draw them.

Are some of these polygons excessively high resolution for the amount of visual space on the screen? If so, how about reducing their polygon count / texture resolution?

If your polygons are static but procedurally generated, can you precompute them (trade disk space for FPS).

If one object doesn't move with respect to another, can you cache properties that avoid you having to compute them every frame - like light/shadow maps and occlusion maps?

If you have some objects which don't move at all, can you merge them all into a single massive object so that DirectX has to service less calls?

Bear in mind that things like modern games are so pretty precisely because every polygon they send to the GPU is a polygon they need - the hills in the background and the grass underfoot is super-low resolution with tricks and magic precisely so they can render your flaming sword and mutant enemies with as many polygons as they can muster - and since those are the ones you're looking at, you think the game has awesome graphics without forcing your customers to go and buy new hardware.