Performance guidelines?

Started by
2 comments, last by davidlee80 10 years, 2 months ago

Hi, I've recently taken up my game development again after a couple of years doing other stuff. I've created a basic 3D renderer to the point where I'm getting some geometry on screen with non-shadowed point light shading. Now I want to expand this with some culling, additional light sources and some more materials etc. Nothing too fancy, just the basics. When I studied 3D graphics, the main performance consideration involved culling, even sub-mesh. "The fastest triangles are the ones not drawn". These days I've gotten the impression that it might be better to draw a few extra triangles than to make more api calls.

I was hoping people could give me some rough high-level guidelines on what to do and what to avoid. Reducing draw calls, switching shaders, setting shader parameters, reducing total triangles, ..

Advertisement

This is a difficult question to answer with a yes or no, or 'you should do a b and c'.

It all depends on the context, target hardware/ specs, your goals etc.

But as a guideline, I try to keep the following principles in mind:

- profile, profile and profile again. Not in FPS, but ms per frame. Personally if I stay within 'v-sync' range (< 16.7ms) on acceptable hardware, I'm ok with it

- prevent 30 draw calls of 100 triangles, better 3x 1000

- sorting on materials, meshes, state sets and shaders will save state changes/ buffer changes

I would just give it a go, have fun, implement stuff and then check and profile.

Assuming that your codebase will be flexible enough to make changes depending on the profiling.

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

The thing is that I kindof hate writing rendering code so I'd like to avoid doing to much experimenting. I love the actual game development, just not the rendering. I'm only doing it because I need to hide my lack of art content. The existing solutions are either way too content driven or "impossible" to use with an existing game logic engine.

I'm targetting PCs with DX11 class hardware since I'm guessing there won't be anything lower than that still functioning when I get around to releasing anything.

In order to give this topic a fighting chance of spawning some form of conversation, I'll provide some additionals on my goals. I want a simple to use renderer that can make the best of limited (quality and quantity) content. I would expect typical scenes to be top-down and more likely to include many low-poly objects than few high-poly ones. Typical games include multiplayer strategy games such as RTSes, Tower Defences, simulations and possibly hack 'n' slash types of games.

What are your personal experiences, what gave you boosts and what slowed things down?


The thing is that I kindof hate writing rendering code so I'd like to avoid doing to much experimenting. I love the actual game development, just not the rendering. I'm only doing it because I need to hide my lack of art content. The existing solutions are either way too content driven or "impossible" to use with an existing game logic engine.

maybe some profile tools are good friends.(Pix, Intel:GPA, NV:Nsight, AMD:Perfstudio)


What are your personal experiences, what gave you boosts and what slowed things down?

in our project, the DP count and PS shader always hurt us.

This topic is closed to new replies.

Advertisement