Search Unity

Help Wanted Weird behavior with the triplanar node

Discussion in 'Shader Graph' started by CosmosBear, Oct 18, 2019.

  1. CosmosBear

    CosmosBear

    Joined:
    Aug 2, 2012
    Posts:
    50
    Hi, I'm far from being a pro with shader graph and I'm in no way a technical artist but I managed to make some fun shader with shadergraph.

    I noticed that something with the triplanar node has changed (recently or not) since the graph I made using this feature has totaly changed the result.

    Ex.: at the time I used this shader on a rock, the textures would move depending of the position of the object in the world

    Now, it does that PLUS it move along with the camera (viewport and game camera) wich is weird...

    test.jpg ezgif.com-video-to-gif.gif
    I'm moving the viewport camera in the video...

    What I'm I doing wrong?
     
  2. alexandral_unity

    alexandral_unity

    Unity Technologies

    Joined:
    Jun 18, 2018
    Posts:
    110
    World space position in HDRP has updated to be camera relative, try overriding the Position slot with Absolute Position from the Position node.
     
  3. CosmosBear

    CosmosBear

    Joined:
    Aug 2, 2012
    Posts:
    50
    Yes, but by doing this the Uv remain static like if it was in object space.
    To fixed it I had to actually plug a postion node with world space to the position slot... wich is misleading since by default, a world space (default node) is already plugged.

    Untitled-1.jpg

    this way the texture only offset when I move the object but not when I move my camera too.
     
  4. CosmosBear

    CosmosBear

    Joined:
    Aug 2, 2012
    Posts:
    50
    I guess it's solved now, thanks!!
     
  5. Tricktale

    Tricktale

    Joined:
    Jan 23, 2015
    Posts:
    28
    Also encountered this issue after upgrading my project. Thanks CosmosBear for posting the solution.
    This has to be some oversight though, as I can't imagine this is the desired behaviour!
     
unityunity