Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualBuraCULa

Posted 03 April 2012 - 12:49 PM

Hi. I am trying to pack my view space normals into two float with spheremap transformation. Actually i can pack and unpack them well but, while packing specific vectors - (0,0,1) and (0,0,-1) - , the algorithm is trying to call normalize(0,0). So this is causing a infinite result. Is there any way to solve this without placing some if statements into packing and unpacking functions ? I am using functions from here.

#1BuraCULa

Posted 03 April 2012 - 12:48 PM

Hi. I am trying to pack my view space normals into two float with spheremap transformation. Actually i can pack and unpack them well but, while packing specific vectors - (0,0,1) and (0,0,-1) - , the algorithm is trying to call normalize(0,0). So this is causing a infinite result. Is there a way to solve this without placing some if statements into packing and unpacking functions ? I am using functions from here.

PARTNERS