PDA

View Full Version : specular lighting



sb
05-09-2001, 09:33 AM
Two qustions:
Does separate_specular_color give better specular lighting even when texture mapping isnt used/enabled? Why?

It seams like my specular lighting gets screwed up only by enabling texture2d even on objects that are not textured is that correct? Why?

I thought that separate_specular_color only adds the specular lighting later(after textureing) and that only textured objects losed some of its specular color (modulation).

/sb

[This message has been edited by sb (edited 05-09-2001).]

davepermen
05-09-2001, 10:10 AM
after you enabled texture2d, every following rendered object has textures till you disable it..

separatespecular does this:

color0 = diffusecolorcalculation
color1 = specularcolorcalculation

out = color0 * tex0 + color1
instead of
out = ( color0 + color1 ) * tex0, wich is wrong

sb
05-09-2001, 11:25 AM
thanks!

But if your info is right then the answer to my first question would be no.

But check out the specular prog (the torus one with out tex) on this page. http://home.global.co.za/~jhorn/opengl.htm

[This message has been edited by sb (edited 05-09-2001).]