To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 9461
9460  |  9462
Subject: 
Interesting BFC finding
Newsgroups: 
lugnet.cad.dev
Date: 
Sat, 24 Jan 2004 06:32:46 GMT
Viewed: 
1748 times
  
Well, I've finished an initially working implementation of BFC in my next-gen
LDView code tree, and discovered that on my particular video card, BFC actually
slows the rendering down.  A test model renders at about 50 FPS with BFC
handling disabled, and 40 FPS with BFC handling enabled.  At first I thought
this indicated a bug in my code.  However, while my BFC code definitely does
have at least one bug, and probably has quite a few more do to its overall
complexity, I'm 99% sure they aren't causing the slow-down.

I'm pretty sure the key is that LDView is geometry-bound.  It isn't fill-rate
bound, like most games would be.  So my particular video card has plenty of
extra horsepower left over to draw the back faces of all the polygons without
slowing down.  And it still has to calculate where the triangle goes in order to
determine whether it is back facing and should be culled.  So culling the back
faces doesn't improve performance.

Additionally, at a guess, back face culling itself requires an extra calculation
to determine whether or not the face is a back face, and this calculation slows
down the geometry processing, which in turn slows down the overall rendering.
Alternatively, the fact that BFC polygons must be drawn separately from non-BFC
polygons decreases the average group size when I tell OpenGL to draw a group of
triangles or quads.  This decreased group size could lead to the performance
drop.

As it turns out, my ATI video card handles two-sided lighting extremely well,
with very little (if any) slow-down over one-sided lighting.  My previous video
card experienced a significant slow-down when two-sided lighting was enabled, so
I would expect BFC to be more beneficial on it, since two-sided lighting can be
disabled during BFC drawing.

--Travis



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR