View Full Version : Just a Curious Question about Clipping Planes?
11-28-2007, 06:32 AM
Plain and simple...
Does anybody know if glClipPlane affects performance either way. Does it still send the vertices that have been clipped out through the rendering pipeline? And if it doesn't what is done. And is there better alternatives to cull vertices from your object in 3D space.
no diff to Frustum clipping.
But not the best method.
Just don't call the code that does the drawing if you want to
cull verts or a whole object.
Clip planes and frustum clipping is done on the hardware at the last possible moment.
get the redbook
11-28-2007, 12:37 PM
A little more info:
From my understanding of things, nVidia doesn't actually have a real clipping engine. They determine the distance each vertex is from the clip plane and pass that value onto the fragment shader as a varying so you get the interpolated distance from th clip plane of every fragment. Inside the fragment shader the distance is checked for whether it is negative. If so, the fragment is killed. This is done for each enabled clip plane. Standard frustum culling can be done by the scan converter. This would explain such extensions as the depth clamp. The scan converter presumably disables its fragment culling along the z axis and instead clamps the interpolated depth value.
ATI has a dedicated clipper and can perform user clip planes with this. It uses the same logic/stage for frustum culling as clip planes. This has the benefit of not using up an interpolator. However, the clipping is done post projection space. So, this can lead to precision artifacts that would not occur if the clipping occurred pre-projection OR via the interpolator method used by nVidia.
Intel ... no clue.
11-28-2007, 05:18 PM
Thanks guys, that is definately food for thought :oD
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.