Learning DirectX 12 – Lesson 3 – Framework

DirectX 12

DirectX 12 – Lesson 3

In this tutorial, you will be introduced to several classes that will help you to create a robust and flexible framework for building DirectX 12 applications. Some of the problems that are solved with the classes introduced in this lesson are managing CPU descriptors, copying CPU descriptors to GPU visible descriptor heaps, managing resource state across multiple threads, and uploading dynamic buffer data to the GPU. To automatically manage the state and descriptors for resources, a custom command list class is also provided.

Continue reading

Volume Tiled Forward Shading

Volume Tiled Forward Shading

Volume Tiled Forward Shading

In this post, Volume Tiled Forward Shading rendering is described. Volume Tiled Forward Shading is based on Tiled and Clustered Forward Shading described by Ola Olsson et. al. [13][20]. Similar to Clustered Shading, Volume Tiled Forward Shading builds a 3D grid of volume tiles (clusters) and assigns the lights in the scene to the volumes tiles. Only the lights that are intersecting with the volume tile for the current pixel need to be considered during shading. By sorting the lights into volume tiles, the performance of the shading stage can be greatly improved. By building a Bounding Volume Hierarchy (BVH) over the lights in the scene, the performance of the light assignment to tiles phase can also be improved. The Volume Tiled Forward Shading technique combined with the BVH optimization allows for millions of light sources to be active in the scene.

Continue reading

Forward vs Deferred vs Forward+ Rendering with DirectX 11

Forward+ with HLSL

Forward+ with HLSL

In this article, I will analyze and compare three rendering algorithms:

  1. Forward Rendering
  2. Deferred Shading
  3. Forward+ (Tiled Forward Rendering)

Continue reading

Texturing and Lighting in DirectX 11

DirectX 11 Texturing and Lighting

DirectX 11 Texturing and Lighting

In this article I will discuss texture and lighting in DirectX 11 using HLSL shaders.

Continue reading

Introduction to Shader Programming with Cg 3.1

NVIDIA Cg

NVIDIA Cg

In this article I will introduce the reader to shader programming using the Cg shader programming language. I will use OpenGL graphics API to communicate with the Cg shaders. This article does not explain how use OpenGL. If you require an introduction to OpenGL, you can follow my previous article titled Introduction to OpenGL.

Continue reading

OpenGL Interoperability with CUDA

Postprocess Effect

Postprocess Effect

In this article I will discuss how you can use OpenGL textures and buffers in a CUDA kernel. I will demonstrate a simple post-process effect that can be applied to off-screen textures and then rendered to the screen using a full-screen quad. I will assume the reader has some basic knowledge of C/C++ programming, OpenGL, and CUDA. If you lack OpenGL knowledge, you can refer to my previous article titled Introduction to OpenGL or if you have never done anything with CUDA, you can follow my previous article titled Introduction to CUDA.

Continue reading

GPU Skinning of MD5 Models in OpenGL and Cg

Bob with Lamp (GPU Skinning)

Bob with Lamp (GPU Skinning)

This tutorial builds upon the previous article titled [Loading and Animating MD5 Models with OpenGL]. It is highly recommended that you read the previous article before following this one. In this tutorial, I will extend the MD5 model rendering to provide support for GPU skinning. I will also provide an example shader that will perform the vertex skinning in the vertex shader and do per-fragment lighting on the model using a single point light. For a complete discussion on lighting in CgFX, you can refer to my previous article titled [Transformation and Lighting in Cg].
Continue reading