grigorym

05-18-2002, 09:16 AM

Hi!

What formula does OpenGL use to calculate the specular intensity of a vertex?

I thought it is ks*ls*(r,v)^Shiness , where:

ks - specular reflectace of current material;

ls - specular intensuty of the light;

r - vector of the ideal reflectance;

v - vector from the vertex to the eye;

(r,v) - scalar product of vectors r and v;

Shiness - the GL_SHININESS paramenter i've passed...

But when i made my own rendering functions using these formulas, i got another result...

When i pass 1 as GL_SHININESS, the sphere i make with auxSolidSphere(20) is almost fully rendered with maximum intensity, only near the borders of the sphere intensity starts falling down, while using the formula i've described earlier, the spot of light is less greatly...

Can someone clear this thing out for me?

Grigory

What formula does OpenGL use to calculate the specular intensity of a vertex?

I thought it is ks*ls*(r,v)^Shiness , where:

ks - specular reflectace of current material;

ls - specular intensuty of the light;

r - vector of the ideal reflectance;

v - vector from the vertex to the eye;

(r,v) - scalar product of vectors r and v;

Shiness - the GL_SHININESS paramenter i've passed...

But when i made my own rendering functions using these formulas, i got another result...

When i pass 1 as GL_SHININESS, the sphere i make with auxSolidSphere(20) is almost fully rendered with maximum intensity, only near the borders of the sphere intensity starts falling down, while using the formula i've described earlier, the spot of light is less greatly...

Can someone clear this thing out for me?

Grigory