Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Shadow volume
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Optimization == * One method of speeding up the shadow volume geometry calculations is to utilize existing parts of the rendering pipeline to do some of the calculation. For instance, by using [[homogeneous coordinates]], the ''w''-coordinate may be set to zero to extend a point to infinity. This should be accompanied by a [[viewing frustum]] that has a far clipping plane that extends to infinity in order to accommodate those points, accomplished by using a specialized projection matrix. This technique reduces the accuracy of the depth buffer slightly, but the difference is usually negligible. See 2002 paper "Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering", C. Everitt and [[Mark Kilgard|M. Kilgard]], for a detailed implementation. * Rasterization time of the shadow volumes can be reduced by using an in-hardware scissor test to limit the shadows to a specific onscreen rectangle. * Single pass is achievable by using shader built-in variable for detecting front faces instead of two separated passes for culling each the other,combine with replacing stencil buffer with arithmetic blending on color buffer. * [[NVIDIA]] has implemented a hardware capability called the ''depth bounds test'' that is designed to remove parts of shadow volumes that do not affect the visible scene. (This has been available since the [[GeForce]] FX 5900 model.) A discussion of this capability and its use with shadow volumes was presented at the [[Game Developers Conference]] in 2005.<ref>{{cite web|last=Lengyel|first=Eric|title=Advanced Stencil Shadow and Penumbral Wedge Rendering|url=http://www.terathon.com/gdc05_lengyel.pdf|work=Game Developers Conference 2005|publisher=2005|accessdate=18 October 2012}}</ref> * Since the depth-fail method only offers an advantage over depth-pass in the special case where the eye is within a shadow volume, it is preferable to check for this case, and use depth-pass wherever possible. This avoids both the unnecessary back-capping (and the associated rasterization) for cases where depth-fail is unnecessary, as well as the problem of appropriately front-capping for special cases of depth-pass{{Citation needed|date=February 2019}}. * On more recent GPU pipelines, [[geometry shader]]s can be used to generate the shadow volumes.<ref>{{cite web |url=http://developer.nvidia.com/node/168 |title=GPU Gems 3: Chapter 11. Efficient and Robust Shadow Volumes Using Hierarchical Occlusion Culling and Geometry Shaders | NVIDIA Developer Zone |website=developer.nvidia.com |access-date=12 January 2022 |archive-url=https://web.archive.org/web/20110516024500/http://developer.nvidia.com/node/168 |archive-date=16 May 2011 |url-status=dead}}</ref><ref>{{cite web|last=Stich |first=Martin |title=Chapter 11 "Efficient and Robust Shadow Volumes Using Hierarchical Occlusion Culling and Geometry Shaders" |url=https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch11.html |work=GPU Gems 3 |publisher=nVidia / Addison-Wesley |accessdate=18 October 2012 |author2=Carsten Wächter |author3=Alexander Keller |archiveurl=https://web.archive.org/web/20110516024500/http://developer.nvidia.com/node/168 |archivedate=May 16, 2011 |location=archive.org |year=2007 }}</ref> * On systems that do not support geometry shaders, [[vertex shaders]] can also be used to create shadow volumes by selectively extruding vertices that already reside within GPU memory.<ref>{{Cite web|url=http://developer.amd.com/wordpress/media/2012/10/ShaderX_ShadowExtrusion.pdf|title=Shadow Volume Extrusion using a Vertex Shader|last=Brennan|first=Chris|date=|website=AMD|access-date=2018-02-14}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)