PDA

View Full Version : problem with per fragment lighting



airseb
06-29-2005, 12:51 PM
Hi,
My loader seems to work without the shaders. The per fragment shader works perfectly under renderMonkey. But when i activate this shader the model isn't lighted... i just can see the material's color and this shader works for one of my models but not with the others.
I have had a similar problem before i have tought that it was an attenuation problem. I have changed the value of the quadratic factor (1.0, 0.00035,...) but i don't know what to use because nothing works (except for one model).
Can you help me to choose the attenuation factor(s) ? or tell me if it comes from something else ?

airseb
06-30-2005, 07:42 AM
in fact, it looks that that there are two problem :
1)Attenuation is not correct for some models
2)my lighting is correct(when attenuation is correct too) only for the part of the object which is firstly lighted by the light. But when i turn the model on itself, the parts which were hidden are either not lighted or lighted incorrectly.
Do you see what i mean ? and do you have an idea ?