Jump to content

  • Log In with Google      Sign In   
  • Create Account


Richards Software Ramblings



OutOfMemoryException - Eliminating Temporary Allocations with Static Buffers in Effect Wrapper Code

Posted by ericrrichards22, 13 December 2013 · 375 views
C#, SlimDX, DirectX 11, Memory
I came across an interesting bug in the wrapper classes for my HLSL shader effects today. In preparation for creating a class to represent a game unit, for the purposes of demonstrating the terrain pathfinding code that I finished up last night, I had been refactoring my BasicModel and SkinnedModel classes to inherit from a common abstract base class, a...


Refactoring Rendering Code out of the Terrain Class

Posted by ericrrichards22, 12 December 2013 · 333 views
Terrain, SlimDX, C#, DirectX 11 and 2 more...
Howdy, time for an update. I’ve mostly gotten my terrain pathfinding code first cut completed; I’m creating the navigation graph, and I’ve got an implementation of A* finished that allows me to create a list of terrain nodes that represents the path between tile A and tile B. I’m going to hold off a bit on presenting all of that, since I haven’t yet manag...


Terrain Tile Picking in 3D

Posted by ericrrichards22, 05 December 2013 · 500 views
C#, SlimDX, DirectX 11, Terrain and 1 more...
Typically, in a strategy game, in addition to the triangle mesh that we use to draw the terrain, there is an underlying logical representation, usually dividing the terrain into rectangular or hexagonal tiles. This grid is generally what is used to order units around, construct buildings, select targets and so forth. To do all this, we need to be able t...


A Terrain Minimap with SlimDX and DirectX 11

Posted by ericrrichards22, 20 November 2013 · 585 views
SlimDX, DirectX, C#, Terrain and 1 more...
Minimaps are a common feature of many different types of games, especially those in which the game world is larger than the area the player can see on screen at once. Generally, a minimap allows the player to keep track of where they are in the larger game world, and in many games, particularly strategy and simulation games where the view camera is no...


Adding Shadow-mapping and SSAO to the Terrain

Posted by ericrrichards22, 17 November 2013 · 413 views
SSAO, SlimDX, C#, DirectX 11 and 2 more...
Now that I’m finished up with everything that I wanted to cover from Frank Luna’s Introduction to 3D Game Programming with Direct3D 11.0 , I want to spend some time improving the Terrain class that we introduced earlier . My ultimate goal is to create a two tiered strategy game, with a turn-based strategic level and either a turn-based or real-t...


Rendering Water with Displacement Mapping

Posted by ericrrichards22, 12 November 2013 · 393 views
SlimDX, C#, DirectX11 and 2 more...
Quite a while back , I presented an example that rendered water waves by computing a wave equation and updating a polygonal mesh each frame. This method produced fairly nice graphical results, but it was very CPU-intensive, and relied on updating a vertex buffer every frame, so it had relatively poor performance.

We can use displacement mapping to ap...


SSAO with SlimDX and DirectX11

Posted by ericrrichards22, 07 November 2013 · 480 views
DirectX 11, SlimDX, C#, SSAO and 1 more...
In real-time lighting applications, like games, we usually only calculate direct lighting, i.e. light that originates from a light source and hits an object directly. The Phong lighting model that we have been using thus far is an example of this; we only calculate the direct diffuse and specular lighting. We either ignore indirect light (light that ha...


Windows 8.1 and SlimDX

Posted by ericrrichards22, 03 November 2013 · 583 views
Windows 8.1, SlimDX
This weekend, I updated my home workstation from Windows 8 to Windows 8.1. Just before doing this, I had done a bunch of work on my SSAO implementation, which I was intending to write up here once I got back from a visit home to do some deer hunting and help my parents get their firewood in. When I got back, I fired up my machine, and loaded up VS to r...


Shadow Mapping with SlimDX and DirectX 11

Posted by ericrrichards22, 28 October 2013 · 374 views
SlimDX, C#, DirectX 11 and 2 more...
Shadow mapping is a technique to cast shadows from arbitrary objects onto arbitrary 3D surfaces. You may recall that we implemented planar shadows earlier using the stencil buffer. Although this technique worked well for rendering shadows onto planar (flat) surfaces, this technique does not work well when we want to cast shadows onto curved or irregul...


Expanding our BasicModel Class

Posted by ericrrichards22, 25 October 2013 · 300 views
C#, SlimDX, DirectX 11, Models
I had promised that we would move on to discussing shadows, using the shadow mapping technique. However, when I got back into the code I had written for that example, I realized that I was really sick of handling all of the geometry for our stock columns & skull scene. So I decided that, rather than manage all of the buffer creation and litter the...






October 2014 »

S M T W T F S
    1 234
567891011
12131415161718
19202122232425
262728293031 

Latest Visitors

PARTNERS