Jump to content

  • Log In with Google      Sign In   
  • Create Account

14 years ago on June 15th Gamedev.net was first launched! We want to thank all of you for being part of our community and hope the best years are ahead of us. Happy birthday Gamedev.net!

#Actualrdragon1

Posted 08 July 2012 - 03:55 AM

because i have to take the negative normal from the vertex.


I'm going to guess that your normals are in one space, and your lighting is being done in another space. Are you doing your light calculation in world space? If so, did you transform your normal into world space from (presumably) object space? Or maybe you have an up-axis wrong in some context. Or maybe your light direction vector is pointing in the wrong direction (if you're trying to calculate "N dot L", L should point from the surface to the light)


For now all NormalCalculations are done on the CPU, but is there an easy way of doing it on the GPU? I'm relatively new to this, so theres a lot to learn ;)



Depends. What do you mean by "NormalCalculations" ?

#1rdragon1

Posted 08 July 2012 - 03:53 AM

because i have to take the negative normal from the vertex.


I'm going to guess that your normals are in one space, and your lighting is being done in another space. Are you doing your light calculation in world space? If so, did you transform your normal into world space from (presumably) object space


For now all NormalCalculations are done on the CPU, but is there an easy way of doing it on the GPU? I'm relatively new to this, so theres a lot to learn ;)



Depends. What do you mean by "NormalCalculations" ?

PARTNERS