PDA

View Full Version : Volume Rendering about empty space skip!



spring
06-03-2006, 09:39 PM
I get good guy help in this fourm! Thanks!
now , I meet a problem again!


the following quote from J. Kr¨uger and R. Westermann "Acceleration Techniques for GPU-based Volume Rendering"

The essential mechanism that allows us to effectively integrate early ray termination and empty-space skipping into the ray-casting process is the early z-test. It is applied before the shader program is executed for a particular fragment, and it can be used to avoid the execution thus enabling a fragment processor to process the next incoming fragment. The early z-test, however, is only enabled if all other per-fragment tests are disabled and the fragments depth value is not modified in the shader. The effect of the early z-test can be demonstrated quite easily, by simply drawing an opaque quadrilateral occluding parts of a volume prior to rendering the volume. If the depth test is enabled and depth values have been written in the first pass, a considerable speed up can be perceived that is directly proportional to the area of the occluded parts of the volume.


I can not understand why early z-test can avoid execution of current fragment and make a fragment processor to process the next incoming fragment? who can explain it ? And I want to find some detail information about it and empty space , who can give me some informatin or example code which use the empty space skip technique?

thanks advanced!

ZbuffeR
06-04-2006, 12:06 AM
It is better explained later in the paper PDF. Search for "early z".

Basically, for complex shaders (that don't write/modify Z), it is an efficient optimisation to predict final z value for a fragment, do the depth test, and avoid shader execution for this fragment if test fails.
All this is hidden in the hardware, and have different constraints and benefits with NVIDIA or ATI cards.

BTW, please provide a link in these cases, it is easier :)
http://wwwcg.in.tum.de/Research/Publications/Raycast