View Full Version : 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...
09-28-2004, 06:22 AM
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.
09-28-2004, 11:09 AM
For CrazyButcher: the example is interesting, but I think I wasn't clear: I want normal mapping using OGL shading language.
09-29-2004, 04:11 AM
http://download.nvidia.com/developer/SDK/Individual_Samples/DEMOS/OpenGL/bump_mapping .zip (http://download.nvidia.com/developer/SDK/Individual_Samples/DEMOS/OpenGL/bump_mapping.zip)
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.