PDA

View Full Version : Trouble with lights settings in shader.



Maniac
October 13th, 2009, 07:23 PM
I have 2 bases, they have some light emitting faces on them, they are on 2 seperate materials and material id's. I have 2 shaders for the 2 materials (one red and one blue), and the shaders have the same "power" values for light.

When i make the values of light "power" identical then one base does not get lit.
example: if i make the power 5000 in the red and 5000 in blue then only one will produce light.
if i make the power 4999 in red and 5000 in blue then only blue shows and vice versa.

im really quite stumped.

Higuy
October 13th, 2009, 07:27 PM
Try taking both textures and putting them into 1 texture
Use only 1 shader instead now, and only use white as your light. Should work then.
(if you were using red and blue, then idk sry)

Maniac
October 13th, 2009, 07:29 PM
I am using red and blue.
But it should work with 2 materials and 2 shaders i thought.

Higuy
October 13th, 2009, 07:31 PM
I am using red and blue.
But it should work with 2 materials and 2 shaders i thought.
Are you running radiosity in Sapien, or in Tool?
If its tool, trying running it in sapien, if you already were using sapien, try tool then. I remember having this problem sometime ago too, and I remember I ran the final lightmaps in sapien and they both lit up.

Maniac
October 13th, 2009, 07:39 PM
I was using tool.
Ill try that, thanks Higuy.

chrisk123999
October 13th, 2009, 11:09 PM
Tool doesn't do lights right. Sometimes it does them, sometimes it doesn't.

English Mobster
October 13th, 2009, 11:53 PM
If you have 2 shaders referencing the same bitmap, it'll randomly choose one of them. It sounds like you're using the same bitmap, but trying to use 2 different shaders to light them, one red and one blue.

Maniac
October 14th, 2009, 12:45 AM
I am using 2 bitmaps (red and blue) and 2 shaders (red and blue)