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 ShaderGraph: Texture2DArray and triplanar node compatibility, created new node...

Discussion in 'Shader Graph' started by thecrippler, Aug 20, 2019.

  1. thecrippler

    thecrippler

    Joined:
    Feb 11, 2017
    Posts:
    4
    I went to build a new shaderGraph and noticed that I cannot use the texture2DArray node with the triplanar uvs node. It makes sense since the textureArray requires more parameters for sampling (the array index).

    I probably went about a solution the wrong way, but I dug around for the TriplanarNode.cs, made a copy and modified it so the texture array would work. Worked out great, I ended up with a new node that I called TriplanarArrayNode.

    BUT

    Since my new node was not part of the shadergraph package it gets removed every time I restart unity.

    Is there a way to make this work before I go down another path? Is there anyway to include my new node? I saw there is a custom function node but its not available in the version of unity I'm using and I really hesitate to upgrade because I'm in the middle of a project.

    Solutions going through my head are:

    1. Find a way to include the new node
    2. update unity and try the custom function node
    3. reproduce the triplanar math in the shadergraph (make a sub-graph with all the uv math)

    Any ideas on this or suggestions?


    Unity 2019.1.10f1
    ShaderGraph 5.7.2
    LWRP
     

    Attached Files:

    Blueeyesjt10 likes this.
  2. Ommand

    Ommand

    Joined:
    Apr 29, 2015
    Posts:
    6
    Hi! Did you manage to solve your problem?
     
    Blueeyesjt10 likes this.