Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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,682
    $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:
    12
    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,325
    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,770
    That somehow took a long time, but should be fixed in a 4.5.4p2 patch release next week.
     
    VIC20 likes this.