Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Absolute of Normal Vector result inconsistent between Unity 2018.3 and 2019.2

Discussion in 'Shader Graph' started by Tinovdk, Sep 3, 2019.

  1. Tinovdk

    Tinovdk

    Joined:
    Nov 28, 2013
    Posts:
    83
    Upgrading Unity versions, I noticed that taking the absolute of the Normal Vector produced different results. It's likely that this is causing my shader look different than before.

    2019-09-03_11-23-31.png

    2019-09-03_11-24-12.png

    I'm not proficient enough in writing shaders to solve this so I resorted to a workaround where I export the shader result from 2018.3 and use it in 2019.2. Obviously this is not a very maintainable workaround so in the meanwhile I would like to understand how I can get Shader Graph to export the same result once again.

    Thanks!
     
  2. alexandral_unity

    alexandral_unity

    Unity Technologies

    Joined:
    Jun 18, 2018
    Posts:
    163
    Are you using HDRP or Lightweight/Universal?
     
  3. Tinovdk

    Tinovdk

    Joined:
    Nov 28, 2013
    Posts:
    83
    Lightweight. These are the packages I'm using.
    upload_2019-9-4_19-30-12.png

    I don't know if it helps but these are the nodes of the graph I wanted to upgrade from 2018.3 to 2019.2.

    2018.3
    2019-09-04_19-36-56.png

    2019.2
    chrome_2019-09-04_19-39-03.png

    The first node with a pink preview in 2019.2 is right after the Absolute node.

    It should create a pretty cool tri-planar simplex noise effect. The pink jitter was not an issue outside of Shader Graph.

     
    Last edited: Sep 4, 2019
  4. alexandral_unity

    alexandral_unity

    Unity Technologies

    Joined:
    Jun 18, 2018
    Posts:
    163
    Did a quick check, I can't reproduce that behavior in 2019.3 but I can in 2019.2, so whatever is causing the bug has been fixed in the package for 2019.3 . If you want to file an official bug report we can take a look and see if we can backport it, but it is fixed in newer versions.
     
  5. Tinovdk

    Tinovdk

    Joined:
    Nov 28, 2013
    Posts:
    83
    That is comforting to know. Then I will use the workaround until we upgrade. We initially tried upgrading the project to 2019.3 but we are reliant on this Ambient Occlusion to keep working (https://github.com/beinteractive/LWRPAmbientOcclusion) and it seems UniversalRP has it's own in-built post-processing. I couldn't get this to play nice with UniversalRP yet.