I was trying to display some Skyrim objects that have both color and normalmap. The technique it use is not bump-mapping i believe. You can see example here.
whereas typical bump-map looks like this.
It is hard to find shaders that can render it I have tried modifying the code myself a bit too, but the math behind them is still complicated. Basically neither shader should not include word "gl_Normal", in my opinion. The normal in pixel position is exactly that of normalMap texture in those coords. Every shader that i have found is using gl_Normal.
This also explains a bit:
http://mvarts.wordpress.com/2011/03/...t-compression/
Normal mapping is an application of bump mapping, and was introduced by Peercy et al. [2]. While bump mapping perturbs the existing surface normals of an object, normal mapping replaces the normals entirely. A normal map is a texture that stores normals. These normals are usually stored as unit-length vectors with three components: X, Y and Z. Normal mapping has significant performance benefits over bump mapping, in that far fewer operations are required to calculate the surface lighting.
Bookmarks