View Full Version : how make bump mapping with open gl ?
airseb
09-22-2003, 08:27 AM
with what open gl functions i can do it ?
thanks.
jwatte
09-22-2003, 08:37 AM
You have the texture matrix per texture unit.
You have the DOT3 function for the TexEnv.
Easiest is to put object space normal map into a texture, light direction into a texture environment color, and set the combine function to DOT3. Then modulate with diffuse color in the next stage.
Also, with ARB_fragment_program, you just write whatever bump sampling and per-pixel lighting function you want, so there the API doesn't get in the way at all; it's all up to you.
V-man
09-22-2003, 08:40 AM
There are many ways (tex_combiner, reg_combiner, ...) but it basically involves a DOT product calculation per fragment.
Why not download a demo from ati or nvidia?
airseb
09-22-2003, 08:42 AM
ok thanks guys ! i'll study your proposals :-)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.