Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#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:

Posted Image

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

Posted Image

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:

Posted Image

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

Posted Image

the code now looks like this

i guess i'm still missing something :/

PARTNERS