I want my scene to have texture-modulated specular mapping, as in a texture map defining the shininess level of a model, but I'm having trouble finding a way to do that in a single pass.
Right now I'm using a two-pass approach, where I render the objects using the specular level texture and only specular light active, then blend it with the standard illuminated diffuse color pass. It seems to me that it should be fairly simple to modulate the specular level based on a texture (or an alpha component of a texture), but I couldn't find any way to do it without resorting to the two-pass approach.
I found a way to do it in Direct3D, but I don't want to touch that thing with a 10 foot pole, so I ask you: how can I do this? Can anyone point me to a tutorial and/or demo source that does it?
Thanks in advance.



