cg bump mapping problems
I am trying to modify the "bump mapping of a torus" code by "The CG Tutorial" to change the torus to a cylinder.
The bump mapped cylinder appears to be good, but in some areas (mostly the darker ones) there are strange brights that change when the eyeview changes.
I do not know what I am doing wrong.
The problem desappears when I do not add the specular light.
Could somebody give me a clue?
Here is the tutorial with the original source code:
Cg Bump Tutorial
Here is my modified C source code:
C code
Here is my modified CG vertex program:
vertex program
Here is the fragment program (I have not touched it):
fragment program
Major changes are:
- I have changed the torus parametric equations and rotation matrix with cylinder ones in the vertex program.
- I have added some keys to move the eyeview: a,b,q,w,+,-
Thank you and sorry for my English.
[Edited by - karmapolice on January 17, 2008 3:18:25 PM]
hey
Thought I'd let ya know that ya rafb.net links are broken. I suggest http://pastebin.com, where you can select how long ya want things to stay.
cya
Thought I'd let ya know that ya rafb.net links are broken. I suggest http://pastebin.com, where you can select how long ya want things to stay.
cya
Quote:Original post by yosh64
hey
Thought I'd let ya know that ya rafb.net links are broken. I suggest http://pastebin.com, where you can select how long ya want things to stay.
cya
Thank you very much. I didn't know rafb.net was so mean :P
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement