Skip to main content
gamedev.net
🔒 Locked

Stencil buffer

Started by Felipe_Ribas Jan 14, 2007 at 4:02 AM 2 replies 650+ views
Original Post
Felipe_Ribas
Felipe_Ribas
Hi, I'd like to know what is the stencil buffer. What is it for and how to use it after setting it on in d3d present parameters? thanks
_neutrin0_
_neutrin0_
The basic use of stencil buffer is to limit the area of rendering. Combined with depth testing the stencil buffer can be used to create some interesting effects like shadow volumes (Doom 3 like shadows), planar reflections and many more.

On how to use stencil buffer, get a good book on DirectX and/or [google]
++ My::Game ++
Felipe_Ribas
Felipe_Ribas
Thanks. But I didn't understand one thing: How does a combination between depth and stencil can do this kind of effect?

thanks
_neutrin0_
_neutrin0_
It is difficult to explain on a post like this. This is a complex topic and deserves a lot of explanation. I would rather suggest downloading the shadow volume sample from here and reading the paper on Robust Shadow Volumes

Also read this article
++ My::Game ++

Topic Locked

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

Sign in to reply to this topic.