Okay, I think I’m behind the times here. My book says that to render shiny specular highlights on an object with a texture, I must use a two-pass approach, first rendering with the texture, then using a second pass without to blend the specular highlight in.
Is there any way to do this in one pass now? Any way to utilize multitexturing to make it one pass? What are my options?
On GeForces (and probably any reasonably current hardware) it doesn’t incur any performance hit. You could even code it in Register Combiners and just use the final combiner stage (which is free, btw). Any card that supports OpenGL 1.2 (even if Windows doesn’t) supports EXT_separate_specular.
Even if your card is somewhat slow with this, it can’t be slower than sending the triangle again via multipass. Especially tossing blending into the picture (which causes a bandwidth hit too).
Technically, you don’t need either multipass or EXT_separate_specular. The specular color will simply blend with the diffuse color to give an unrealistic appearence.
This is supported on our products and is not a performance hit. We’ve had separate interpolators for diffuse and specular since Rage Pro, with no perf hit. Here are a few sample apps:
Well thanks guys. I just wasn’t sure how prevalent this extension was on current cards. And the performance issue was a question too.
Thanks for the Demo’s Jason. I haven’t looked at them yet, and I’m sure they’ll work. Does ATI have any sort of developer’s program? Would you guys be willing to send a (free) sample Radeon? Right now our development base is the NVidia line and 3dlabs. Not a single ATI in the house (except Mobility’s in laptops, which we all know don’t do OpenGL).