post from paolom, in the “suggestion from the next opengl release” topic:
A specular map should be a texture map, with its data used as an intensity of the specular color in a specific point. Combining this with the separate specular color, would allow for polygons where there is a texture map, and a specular map that is used for calculating the factor of added specular color. So I could have 1 simple quad representing, for ex., the front side of a building: I’d use a single texture for representing wall, windows and the doors. By using a specular map I’ll mark brick zones with dark grey, and the window zones with bright white, to have a glass-like material with high specularity.
i think you can do it now with a 2-pass algo:
-draw the object with only ambient and diffuse components, with the diffuse texture applied
-enable blending, set blending function to screen blending GL_ONE,GL_ONE
-render the object with only specular component and gloss texture applied
texture environment must be GL_MODULATE
it’s very interesting, i’ll give it a try this night