• Create Account

### #Actualtuccio

Posted 29 June 2012 - 08:00 AM

The light parameters are 4-dimensional vectors, not 3-dimensional vectors as in your code. OpenGL is currently reading the fourth component from outside the corresponding arrays.

oh, thank you

that helped, and now it works fine if i set position's w component to 1 (so that the light propagates in all directions), as you can see:

but if i put w to 0 to get a directional light, this is what i get:

the code now looks like this

i guess i'm still missing something :/

### #1tuccio

Posted 29 June 2012 - 07:59 AM

oh, thank you

that helped, and now it works fine if i set position's w component to 1 (so that the light propagates in all directions), as you can see:

but if i put w to 0 to get a directional light, this is what i get:

the code now looks like this

i guess i'm still missing something :/

PARTNERS