If your interested in a great book to really get you a strong foundation in directx 11, check out Frank Luna's "Introduction to 3D Game Programming with DirectX 11":
-> Download Lesson Source Code <-
HLSL Constant Buffer Packaging - If your having problems with constant buffers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The outcome of this tutorial will not look any different from the last tutorial, but implimenting a depth/stencil buffer is necessary to render 3D scenes in directx. |
|
|
|
|
|
|
|
|
|
This lesson builds off the last lesson "Textures". We will add blending to our lesson, so the two boxes will look like they are made of stained glass or something. We will also learn about a problem when rendering transparent objects, where they are transparent to each other sometimes, and sometimes they are not transparent to each other at all. |
|
|
|
As you may or may not know already, font in direct3d 11 is a pain in the ass to say the least. I don't know what the developers were thinking exactly, but I believe they have taken out the ID3DXFont interface from direct3d in order to direct people to two new API's, Direct2D and DirectWrite. However, the worst part about this is that Direct2D is not "interopable" with D3D 11, meaning you can't use them together directly... (A big thumbs down for microsoft). So anyway, enough complaining. There are a couple ways we can impliment font into D3D 11, and the one we will be learning about uses the two new API's microsoft wants us to use, because in fact, they could be very usefull and pretty cool, not to mention flexible (except for the fact we can't use them directly with a D3D 11 device...). Since we are not able to use them directly with a D3D 11, we will need to use them with a D3D 10.1 device, and swap between the two devices when rendering. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This lesson will build directly off the last lesson, spotlights. The upcoming lessons (Specular lighting, and Normal mapping. Probably others too) will use the code from this lesson as the starting point. BTW, please go easy on me when making fun of my poor modeling skills... |
|
The image to the left shows you the end result using normal mapping (left) compared to no normal mapping (right). |
|
Here we will learn how to turn the 2d screen position (in pixels) that the mouse cursor is at, into a 3d ray in world space. We can then check to see if that ray intersects with any of the objects on the screen. (The objects in this case are "supposed" to be bottles, but i've been recently told they look like urns...). If the ray intersects with any of the bottles in this lesson, we will display the distance from the camera to that bottle, increase the score, and remove that bottle from being displayed any longer and from being checked if the ray picks it again. |
|
We will be learning how to create and use a Bounding Box and a Bounding Sphere. The bounding box is usually more accurate than the bounding sphere, but it also takes a little more time to do the picking operation than the sphere takes. We will use our High Resolution timer from an ealier lesson to time exactly how long the operation for each picking method takes. |
|
In this lesson, we will build a pyramid of bottles or something, and "throw" a bottle when the mouse button is clicked. If the "thrown" bottle collides with one or more of the bottles in the pyramid, then they both just dissapear and the score is increased. I know, I know, not very realistic physics, but i've decided to skip all that extra stuff so we can just focus plainly on the actual collision detection methods. |
|
- The "md5mesh" format - A breif introduction to quaternions - How "bones" work in skinned models (You may be wondering why it's taken me so long to complete this lesson. The reason is because i'm so bad with creating 3D models, and I would like to have a decent looking model for this lesson, since we will be animating it and fun things like that ;) |
|
|
|
|
|
This lesson builds directly off the last lesson, the Free-Look Camera. |
|
This technique does not only apply to a camera, it will apply to any object you wish to slide around, and in fact, you don't even have to have the object slide around, you can VERY EASILY change the code so that the object will "bounce" off the surface instead of sliding across it. |
|
|
|
In this lesson, we will be rendering a forest using the technique called "Instancing". We will be drawing 400 trees, with 1000 leaves on each tree, giving us a total of 400,000 leaves! Instancing is a fast way to draw many of the same meshes with similar geometry but slight changes, such as positions, color, rotations, animation, etc. This technique can mean the difference between 1 frame per second and 500. We will be drawing the trees using instancing, only chaning the position of the trees. Then we will draw the leaves using instancing, passing in a matrix array to a constant buffer which will give us the position of each leaf on a single tree, and using the instance buffer to move the leaves to their correct trees. |
|
I say "CPU Side Frustum Culling" because the GPU actually does frustum culling for us. The problem with that though, is that the GPU must check every single triangle we send to it, so in this lesson, we will check if an objects bounding volume is within view of the camera before we send it to the shaders for more accurate frustum culling. |
|
|
|
We will be using the Geometry shader in this lesson, by sending a single point to the shaders, and expanding that point into a quad using the geometry shader. The result will be perspective facing billboarders, where all billboards are facing the camera. |











































