In this article, I will discuss a technique called normal mapping. Normal mapping is a shader technique that encodes pre-computed surface normals in a texture that can be used to add extra detail to a surface without the requirement of adding extra geometry. Before reading this article, you should have a basic understanding of OpenGL and you should know how to setup a Cg shader. For a review on OpenGL, you can refer to my previous article titled [Introduction to OpenGL for Game Programmers] and to learn how to incorporate Cg shaders in your own applications, you can refer to my article titled [Introduction to Cg Runtime with OpenGL].

# Tag Archives: 3D

# GPU Skinning of MD5 Models in OpenGL and Cg

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

# Transformation and Lighting in Cg

In this article I will demonstrate how to implement a basic lighting model using the Cg shader language. In this article, I assume the reader is familiar with the OpenGL graphics API and how to setup an application that uses OpenGL. If you want to see how you can setup an application that can be used to do OpenGL graphics rendering, you can refer to my previous article titled [Introduction to OpenGL for Game Programmers].

# Introduction to Cg Runtime with OpenGL

I will assume that the reader has some basic knowledge of OpenGL and how to create an application that uses OpenGL to render graphics to the screen. If you need a brief introduction to OpenGL, you can refer to my article [Introduction to OpenGL for Game Programmers]

# Multi-textured Terrain in OpenGL

In this article I will demonstrate one possible way to generate multi-textured terrain using only the OpenGL rendering pipeline. This demo uses the **GL_ARB_multitexture** and **GL_ARB_texture_env_combine** OpenGL extensions to do the multi-textured blending based on the height of the vertex in the terrain. I will also use the **GL_ARB_vertex_buffer_object** extension to store the terrain’s vertex information in the GPU memory for optimized rendering.

I will not show how to setup an application that uses OpenGL. If you would like to review how to setup an OpenGL application you can refer to my previous article titled “Introduction to OpenGL for Game Programmers“.

# Simulating Particle Effects using OpenGL

In this article I will demonstrate one possible way to implement a particle effect in C++ using OpenGL to render the effect. This demo uses the fixed function pipeline and the host processor (CPU) to perform the simulation. In this article, I will use OpenGL and GLUT to render graphics to the application window. If you do not know how to setup an application using OpengGL and GLUT you can refer to my previous article titled [Introduction to OpenGL for Game Programmers] available [here].

Continue reading

# Introduction to DirectX 9 for Game Programmers

In this article I will give a quick introduction to DirectX. I will use Visual Studio 2008 as a development environment for this tutorial and I will start by showing how to install DirectX and configure Visual Studio 2008 to start developing DirectX applications. I assume that the reader has basic programming knowledge in C++. If you require a math refresher, you can refer to my “3D Math Primer” articles on Coordinate Spaces, Vector Operations, and Matrices.

# Introduction to OpenGL for Game Programmers

In this article I will demonstrate a basic introduction in OpenGL. It will be in tutorial format that the reader can follow along on their own. The final result should be a working template that can be used to create your own projects using OpenGL.

# 3D Math Primer for Game Programmers (Matrices)

In this article, I will discuss matrices and operations on matrices. It is assumed that the reader has some experience with Linear Algebra, vectors, operations on vectors, and a basic understanding of matrices.