Introduction to Graphics OptimizationNavigation |
The High Level ProcessSubmitted by epreisz on Sun, 02/11/2007 - 07:26.
At the most abstract level, optimization occurs in a cycle that contains three phases: design, detection, and implementation. When we are learning how to program, we usually only focus on design and implementation, but a third piece, detection, allows us to optimize our applications efficiently. The design and implementation phase can range from months to minutes, while the detection phase should only take minutes. Design Phase It is important to note that optimization includes the design phase. Many people believe you cannot optimize code until you have written it. This is not the case. We can solve 90% of our optimization issues by designing flexible, well designed code. A well designed object hierarchy, even with the overhead of a language like C++, can be much faster than pure assembly code that is poorly written. There is a saying among many of the graphics cards companies that states, “the fastest triangle you can render, is the one you don’t draw”. We can also apply this concept to memory, calculations, I/O, and API calls. The fastest way to use all of these elements is to not use them at all. Culling is the name of the processes we use to determine what calculations we don’t need to do. Usually we think of culling on the level of a single graphical object. By culling an object, we are determining whether or not we should render it. By quickly reducing our potentially visible set, we have greatly reduced the amount of processing. Design Example Let’s examine a simple example that would optimize the rendering of a scene. Figure 2 contains two scenes of trees. Let’s assume that it takes 10 milliseconds to render a tree and 5 milliseconds to cull an object. Rendering the entire scene would take 110 milliseconds. 11 * 10 = 110 msec Now, let’s try frustum culling. Culling 11 objects would take 55 milliseconds. By culling those 11 objects we have determined that we will need to render two trees. That means our cost for this scene is: 11 * 5 msec + 2 * 10 = 75 msec Fantastic! We have reduced the time spent from 110 to 75 msec. That’s a dramatic increase in performance. 7 msec + 5 * 5 msec + 2 * 10 = 52 msec Another increase! We have cut the time we are processing in half! |
User login |
Buy Viagra
dqWtLcr Buy Viagra =-] Buy Cialis 7799
Viagra
nNHJwT Viagra 7855 Cialis XweeP
Buy Viagra online
szRIsde Buy Viagra online >:]] Phentermine online 6351 Buy Cialis Online 3537
Viagra
jCmMZML Viagra 7369 Cheap Ambien :-O Cheap Cialis uziSpZ
Cheap Cialis
VHeuwojI Cheap Cialis 8]]] Buy Viagra 8305 Buy Valium 3462
Viagra
RrcYaDN Viagra lMzGo Xanax :-O Buy Cialis DOTdzd
Cialis
quwJtWO Cialis IyZBd Viagra 6124 Buy Phentermine >:-OOO
Viagra
YgRtae Viagra 0191 Buy Tramadol 3378 Cialis JfeIoZ
Xanax
SFnTaXTx Xanax %-[[[ Viagra >:-OOO Cheap Phentermine :-O Buy Valium ysrfxc Ambien online 8551 Cialis VGXqN
Cheap viagra
UsYWwQvj Cheap viagra 0809 Buy Phentermine 7622 Cialis 1118
Cheap Xanax
kyiJrtu Cheap Xanax >:-OOO Ambien online 5953 Cheap Phentermine 8073 Cheap viagra >:]] Valium online 3939 Buy Cialis 8]]]
Buy Phentermine
boWCeDnc Buy Phentermine 8887 Xanax efrQEr Buy Tramadol iRJCE
Viagra
deysbKpB Viagra 1342 Cheap Cialis 1151
Cheap viagra
FrrlCna Cheap viagra 3526 Cialis 3773
Viagra
HFAyBB Viagra :-O
Viagra
jQlFKMQs Viagra Buy Cialis Buy Cialis Buy Viagra online
Buy Xanax
OqvmCxA Buy Xanax Ambien online Phentermine Cheap Valium
Viagra
wcNsIqfi Viagra Buy Cialis Online
Viagra
NltqQmJ Viagra Cialis
Xanax
UuzUtMS Xanax Cheap Phentermine Buy Ambien Cheap Valium Ultram
Cheap viagra
zyWjZlfp Cheap viagra Cialis
Buy Viagra online
JuMsASDQ Buy Viagra online Cialis
Buy Xanax
zsDBef Buy Xanax Cheap Phentermine Cheap Valium
Buy Viagra
peBVOw Buy Viagra Buy Cialis Online
Buy Xanax
KFbtpl Buy Xanax Phentermine Valium Ambien online
Viagra
nqJLQyQ Viagra Cialis
Cheap Phentermine
jXCzsAy Cheap Phentermine Ambien online Valium Xanax online
Buy Viagra online
RkvZkcMB Buy Viagra online Cialis
Valium
KgsiCWGi Valium Phentermine Cheap Ambien Xanax
Buy Viagra
HxskulYD Buy Viagra Cheap Cialis
Buy Phentermine
SWdqhH Buy Phentermine Ambien Valium online Xanax
Buy Viagra online
diRyZzMS Buy Viagra online Cheap Cialis
Cheap Phentermine
XGINTEY Cheap Phentermine Cheap Tramadol
Cheap viagra
gcTTyuP Cheap viagra Buy Cialis Online
Buy Viagra
gMvwsE Buy Viagra Cialis
Valium online
SMCICXv Valium online Buy Ambien
Phentermine online
vmSCNuoQ Phentermine online Xanax
Buy Viagra
lKevAnYg Buy Viagra Cialis
Phentermine online
KzoJSMnE Phentermine online Xanax online Ambien Valium
Buy Viagra online
ygLuDIR Buy Viagra online Buy Cialis
Viagra
oDMszU Viagra Cheap Cialis
Cheap Xanax
TJcsUTyJ Cheap Xanax Cheap Ambien Phentermine online Valium
Viagra
dtobWH Viagra Buy Cialis Online
Cheap viagra
oqCvLI Cheap viagra Buy Cialis Online
Buy Phentermine
NKwKJLYj Buy Phentermine Xanax online
Buy Viagra online
vavJtAs Buy Viagra online Buy Cialis
Buy Viagra online
aNpjxe Buy Viagra online Cheapest Cialis
Buy Viagra
mkkLNi Buy Viagra Cheapest Cialis
Cheap Phentermine
PlUGJaXD Cheap Phentermine Tramadol
Cheap Valium
WpONzLP Cheap Valium Buy Xanax Buy Ambien