Zanir » Blog Archive » Program 24 – DOT3 bump mapping

Program 24 – DOT3 bump mapping

24.07.2003

024_DOT3_bump_mapping024_DOT3_bump_mapping_3dsDot Product 3 Bump Mapping is per-pixel lighitng. Use dot product per-pixel. Standard lighting in OpenGL is computed per-vertex. I use equation:

color = ambient + (N.L)xDifuzeColor + (N.H)^SpecExp x SpecularColor
N is normal vector, this is texture map, created from bump map with Sobel-Prewitt filter.
L is light vector. L = light_pos – vertex_pos
H = HalfVector = normalize[ ( eye_pos-vertex_pos ) + ( light_pos-vertex_pos) ]

Request: GL_ARB_multitexture, GL_ARB_texture_env_combine, GL_ARB_texture_env_dot3.

source code and executable – 430kB without jpeglibm.lib

Leave a Reply