normal mapping

Does anyone know a link to a simple tutorial with normal mapping - ex. a plane with 2 textures: one with data to show and one with the normals
AND WITHOUT CG, just OGL shading…

Didn’t search for a link, but it’s really not that hard.

chapter 9 of the Orange Book (OpenGL shading language) describes how to implement a vertex and fragment shader that emulate the FFP (fixed functionality pipeline).

Offload the light calculations to your fragment shader - declare and define the varying vec3 ‘normal’ in your vertex shader.

all you have to do now is supply the fragment shader with a normal map and modify the passed in interpolated normal by the value in the normal map texture lookup.

all of your FFP code will take care of the rest.

For CrazyButcher: the example is interesting, but I think I wasn’t clear: I want normal mapping using OGL shading language. .zip