top of page

For the displacement mapping to work, we need three textures:

  1. Surface texture of an object (naturally)

  2. Height / Depth map for displacing the texture

  3. (Optional) Bump map to be used for any lighting calculation you might have

Basically when applying the final texture, we're reading depth data from the depth map, offsetting that part of the texture using that depth data and then finalizing the drawing by doing the lighting calculation using the normal map.

Parallax mapping is using the extra depth information in order to offset the texel correctly so that the resulting texture looks more realistic.

The shader performance is elementary, since it is a relatively simple code without many branches, so the performance is mainly based on the accuracy of the math used in the interpolation calculation for offsetting the texel.

My images uses the simplest form of linear interpolation with a few caveats to improve the quality a little bit but I'm happy with the resulting visuals. 

Normal maps are used for various tasks but in this project, it was mainly used for the lighting calculation.

 

Simple bump map shaders can get away with using just this information in order to fake the depth of a surface, however for deep crevices, this information isn't enough to create a realistic scene.

The normal map is basically a per pixel information of surface normals whereas a depth map is a per pixel information of depth at that specific pixel. It is used for the pixel interpolation for that specific pixel to achieve the more realistic look. However, a normal map is used for a realistic lighting calculation using the surface normals for light specular reflection.

Parallax Mapping is a real time graphics application technique that works similar to how a bump map technique works. It uses a given height or depth map information as a texture and uses the values to make the texture seem like it has depth, making it more realistic.

This technique is a Displacement Mapping technique, which means that the logic behind is displacing vertices using a mapping information in the form of a texture. In ray tracing, the method is elementary. However, for real time applications, applying displacement per vertex becomes too expensive to maintain. Because of this, parallax mapping technique differs from its ray tracing counterpart by "faking" it. 

I'm not going to talk about the methodology in detail, however there are some great resources online that would probably explain it way better than I would.

INTRODUCTION

TEXTURES

NORMAL MAPS

PARALLAX MAPPING

RESULTS

bottom of page