Skip to main content
GameDev.net gamedev.net
🔒 Locked

quick question: backface culling

Started by gamelife Feb 25, 2003 at 9:31 PM 6 replies 300+ views
Original Post
gamelife
gamelife
Can anyone tell me exactly WHERE backface culling (set via D3DRS_CULLMODE) is taking effect in the fixed/programmable geometry pipeline?
RhoneRanger
RhoneRanger
What is does is not render the triangles that are wound in the order you set.

D3DCULL_CCW for example does not render any triangles that are ordered counter-clockwise.
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
gamelife
gamelife
I know what it does, but I don''t know WHERE it happens.
For example, it happens at render time AFTER all depth/stencil tests?
Or, the exact place is hardware-dependent?
RhoneRanger
RhoneRanger
I believe it happens before all tests and alpha blending.
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
kimryo
kimryo
Maybe this pic can explain clearly:

www.sky-info.com/uoboy/pl.bmp

We create world.
God create the world,we create another one.-Reference
thedo
thedo
The pipeline transorms the vertices and does not draw any that are back facing, thus alpha/stencil ops are not an issue.
Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
gamelife
gamelife
That means when I call ProcessVertices on a vertex buffer, the resultant transformed VB won''t contain triangles that are back-faced?
S1CA
S1CA
With ProcessVertices() backface culling WILL NOT remove any triangles. So the output buffer will have the same number of entries as the input buffer. ProcessVertices() also ONLY ever happens in software (due to the read dependency - graphics hardware is intended to be one way: write only) so stencil buffers etc will have no bearing.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.