Jump to content
  • Advertisement
  • entries
  • comments
  • views

Planar Reflections and Shadows using the Stencil Buffer in SlimDX and Direct3D 11

Sign in to follow this  



In this post, we are going to discuss applications of the Direct3D stencil buffer, by porting the example from Chapter 10 of

[/font]Frank Luna's Introduction to 3D Game Programming with Direct3D 11.0[font=Arial]

to C# and SlimDX. We will create a simple scene, consisting of an object (in our case, the skull mesh that we have used


), and some simple room geometry, including a section which will act as a mirror and reflect the rest of the geometry in our scene. We will also implement planar shadows, so that our central object will cast shadows on the rest of our geometry when it is blocking our primary directional light. The full code for this example can be downloaded from my GitHub repository, at


, under the MirrorDemo project.







Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!