Search Unity

After 4.2 Update: faceforward() not working anymore?

Discussion in 'Shaders' started by VIC20, Jul 22, 2013.

  1. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,408
    $faceforw.png

    Worked fine with all versions before 4.2. A problem in CG to GLSL Translator?
     
  2. zFerz

    zFerz

    Joined:
    Dec 4, 2012
    Posts:
    11
    We have this problem too in our main project. We are looking forward to this issue be solved.
     
  3. M-A-K

    M-A-K

    Joined:
    Jul 25, 2013
    Posts:
    4
    Fix:
    fixed3 faceforward(fixed3 n,fixed3 v,fixed3 ng)
    {
    if(dot(v,ng)<0)
    {
    return n;
    }
    return -n;
    }
     
  4. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,327
    Did you report the bug?

    Edit: Regardless, I did. #569508
     
    Last edited: Oct 15, 2013
  5. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,536
    That somehow took a long time, but should be fixed in a 4.5.4p2 patch release next week.
     
    VIC20 likes this.