Original Post
Hey.
Please help me unserstand the process.
My game engine allready uses GLSL and per pixel lighitng so im asuming adding bump mapping would be trivial.
In my fragment shader i calculate the normal of the current pixel and then i compare it with my light source to get the intensity. Now im also passing in the "normal map texture" and im retrieving the "bump map normal" from it for the current pixel.
So now i have 2 normals.
A) The one i always had that i needed for my per pixel lighting and
B) The one i retrieved from my normal map.
Im guessing i need to "combine" them somehow into 1 normal which i can then use to calculate the light intensity.
Am i understanding the process correctly and if i do how do i "combine" the 2 normals?
Thnx in Advance!
Please help me unserstand the process.
My game engine allready uses GLSL and per pixel lighitng so im asuming adding bump mapping would be trivial.
In my fragment shader i calculate the normal of the current pixel and then i compare it with my light source to get the intensity. Now im also passing in the "normal map texture" and im retrieving the "bump map normal" from it for the current pixel.
So now i have 2 normals.
A) The one i always had that i needed for my per pixel lighting and
B) The one i retrieved from my normal map.
Im guessing i need to "combine" them somehow into 1 normal which i can then use to calculate the light intensity.
Am i understanding the process correctly and if i do how do i "combine" the 2 normals?
Thnx in Advance!