Search Unity

Question Normals broken with Triplanar node and Shader graph 7.1.8 + URP

Discussion in 'Shader Graph' started by sebsmax, Jan 30, 2020.

  1. sebsmax

    sebsmax

    Joined:
    Sep 8, 2015
    Posts:
    118
    Triplanar normal unexpectedly change the way light bounce when a applying rotation to an object.

    Here is what I've done
    • Create a new shader PBR with shader graph
    • Add a Triplanar Node
    • Put the type of the node to "Normal"
    • Link it to the normal channel of the PBR master
    • Add a textured2d "normal"

    upload_2020-1-30_10-57-20.png

    • Assign the material to any object (for ex a cube)
    • Spin the object in the editor.
    Before rotation
    upload_2020-1-30_12-36-32.png

    After rotation:
    upload_2020-1-30_12-37-3.png

    This is more visible in a video:





    Expected result:
    • everything stay the same
    Actual result:
    • Light change when rotating

    Case 1215603 -> Normals issue with Triplanar and Shader graph 7.1.8
    https://fogbugz.unity3d.com/default.asp?1215603_ng03qrk736b2hv2p
     
  2. sebsmax

    sebsmax

    Joined:
    Sep 8, 2015
    Posts:
    118
    I did another video where the issue is more clear, And when there is no texture in the normal channel, it's even more visible


    Please note that I've noticed that changing the scale to -1 will flip the normals, but that issue was fixed by the PR #5426 on git
    https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/5426

    however, even after that fix, the triplanar bug is still there