Jump to content

August 2013 »


Recent Entries

Recent Comments

Latest Visitors

View more

Richards Software Ramblings

4: Adsense

A Look-At Camera in SlimDX and Direct3D 11

Today, we are going to reprise our Camera class from the Camera Demo . In addition to the FPS-style camera that we have already implemented, we will create a Look-At camera, a camera that remains focused on a point and pans around its target. This camera will be similar to the very basic camera we implemented for our initial examples (see the Colored C...

Hardware Instancing and Frustum Culling using SlimDX and Direct3D 11

One of the main bottlenecks to the speed of a Direct3D application is the number of Draw calls that are issued to the GPU, along with the overhead of switching shader constants for each object that is drawn. Today, we are going to look at two methods of optimizing our drawing code. Hardware instancing allows us to minimize the overhead of drawing ident...

An FPS Camera in SlimDX

Up until now, we have been using a fixed, orbiting camera to view our demo applications. This style of camera works adequately for our purposes, but for a real game project, you would probably want a more flexible type of camera implementation. Additionally, thus far we have been including our camera-specific code directly in our main application classes,...

Geometry Shader Billboards with SlimDX and DirectX 11

When I first learned about programming DirectX using shaders, it was back when DirectX 9 was the newest thing around. Back then, there were only two stages in the shader pipeline, the Vertex and Pixel shaders that we have been utilizing thus far. DirectX 10 introduced the geometry shader, which allows us to modify entire geometric primitives on the har...

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

In this post, we are going to discuss applications of the Direct3D stencil buffer, by porting the example from Chapter 10 of Frank Luna’s Introduction to 3D Game Programming with Direct3D 11.0 to C# and SlimDX. We will create a simple scene, consisting of an object (in our case, the skull mesh that we have used previously ), and some simple room geo...

Alpha-Blending Demo

Last time , we covered some of the theory that underlies blending and distance fog. This time, we’ll go over the implementation of our demo that uses these effects, the BlendDemo. This will be based off of our previous demo, the Textured Hills Demo , with an added box mesh and a wire fence texture applied to demonstrate pixel clipping using an alpha map...

Blending Theory

This time around, we are going to dig into Chapter 9 of Frank Luna’s Introduction to 3D Game Programming with Direct3D 11.0 . We will be implementing the BlendDemo in the next couple of posts. We will base this demo off our previous example, the Textured Hills Demo . We will be adding transparency to our water mesh, a fog effect, and a box with a wire...

Using a Texture Atlas for Animation

We’re going to wrap up our exploration of Chapter 8 of Frank Luna’s Introduction to 3D Game Programming with Direct3D 11.0 by implementing one of the exercises from the end of the chapter. This exercise asks us to render a cube, similar to our Crate Demo , but this time to show a succession of different textures, in order to create an animation, simi...

Textured Hills Demo

This time around, we are going to revisit our old friend, the Waves Demo , and add textures to the land and water meshes. We will also be taking advantage of the gTexTransform matrix of our Basic.fx shader to tile our land texture multiple times across our mesh, to achieve more detail, and use tiling and translations on on our water mesh texture to create...

Texturing 101–Crate Demo

This time around, we are going to begin with a simple texturing example. We’ll draw a simple cube, and apply a crate-style texture to it. We’ll need to make some changes to our Basic.fx shader code, as well as the C# wrapper class, BasicEffect. Lastly, we’ll need to create a new vertex structure, which will contain, in addition to the position and normal...