View Full Version : how make bump mapping with open gl ?
09-22-2003, 09:27 AM
with what open gl functions i can do it ?
09-22-2003, 09: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.
09-22-2003, 09: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?
09-22-2003, 09:42 AM
ok thanks guys ! i'll study your proposals :-)
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.