Website powered by

Parallax Mapping & Other Shaders

Multiple parallax mapping shaders programmed in C++ and GLSL.

Parallax mapping achieves this effect by calculating shading for each point on a flat surface, making it appear higher or lower than it actually is. This calculation relies on the view direction and a depth map. For each point on the flat plane, it determines the distance under the surface based on the depth map. It then continues along the view direction into the volume for that distance. This approximation works well in most cases but breaks down at steeper viewing angles.

To improve accuracy, a more advanced technique called "steep parallax mapping" is used. It subdivides the travel distance into steps, checking the depth of the detailed surface at each step. This results in better quality but is more computationally intensive.

An even more advanced approach is "parallax occlusion mapping," which approximates the points between the correct texture points before and after hitting the surface. It is a significant improvement over basic parallax mapping, providing a closer approximation to surface detail.

In summary, parallax mapping, steep parallax mapping, and parallax occlusion mapping offer varying levels of quality and performance, making it a cost-effective way to create the illusion of depth in flat surfaces. These techniques are valuable tools in computer graphics for achieving realistic visual effects.

Checkout the Repo on GitHub! ➡️ https://github.com/liamby/Graphics-Programming

Parallax mapping is a texture mapping technique used to create the illusion of depth in flat textures. It addresses the computational expense of displacing thousands of vertices by simulating the appearance of a 3D surface on a flat model.

Phong, toon, and Cook-Torrance shaders are techniques used in computer graphics to create stylized and non-photorealistic rendering of 3D objects. These techniques modify the way light interacts with the surface of the object to create a matte effect.

Programmed Shaders demonstrating various optical effects of light interacting with transparent materials such as transmittance, refraction, chromatic aberration, and Fresnel reflectance

Normal mapping is a technique used to add fine surface detail to 3D models without increasing their polygon count by using a 2D texture to store per-fragment normals. Normals modify the lighting calculations and create the illusion of depth and detail.