MD3 bump mapping problem! Plz HELP!!!
Hello people!
I am trying to use PPL bump Mapping with ARB_fragment_program in quake3 models(md3)
But I fail! I dont know what I am doing wrong... I use qview modelviewr source!
When I am trying to "put" bump mapping, yes it works. but not correct. I test the
normals(using an opengl simple light(per-vertex)) and it looks correct! This means that the
normals are calculated correct! The fragment program I use is correct besuase with this
program i render the world and i have no problem! Also the tagent and binormal calculation
function is correct because I also use it for rendering the world...
I try to trw the polygons model just like I draw the world! but it does not work correct@! yes
I see bump mapping but
1) it is not correct with currect light position. e.g.:the light is behind the model and is
is all dark and if the light goes infront of the model then all the model are bright!
2) not smooth at the edges of the polygons!
The normals is correct (beacause it looks correct when I use OpenGL per-vertex Lighting).
what I am doing wrong?
here is the code for the md3 model drawing:
http://rafb.net/paste/results/uA3zxY26.html
here the vode for the tgent/binormal calculation function:
http://rafb.net/paste/results/BLOaVY92.html
here is the fragment program i use for rendering:
http://rafb.net/paste/results/pSdNk043.html
Thanks in advance!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement