Click to See Complete Forum and Search --> : help


himageofxidian
June 7th, 2004, 11:37 PM
hi guys :
When i make the lighting enable, why the color of the objects
are lost?

himageofxidian
June 7th, 2004, 11:38 PM
thank you

Electroman
June 8th, 2004, 06:48 AM
When your using lights you can't set the color of each vertex because basically the lighting is using the color then. You can think of it as in their are two ways to set the color. Firstly force a color or secondly by letting it be calculated based on the light. I don't think you can make a FVF that allows both but one thing you can do is give the object a texture then the texture can give an aditional color.

With Pixel Shaders you might be able to pull it off mind, not sure though ;).

himageofxidian
June 8th, 2004, 10:42 PM
Dear Electroman:
I got it, thank you evry much!

wien
June 9th, 2004, 09:18 AM
You could also do it in two passes. First render with lighting enabled, and then render again with lighting disabled and with some kind of blending that multiplies the already rendered pixels with the new colored ones. Shouldn't be too hard to do.