Search Unity

Feature Request Access subgraph from Custom Function

Discussion in 'Shader Graph' started by URocks, Mar 2, 2020.

  1. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    159
    Imagine that I have subgraph which is creating star shape (or whatever else) made of dozen nodes...
    Then in the Custom function node, I want to create a lot of these stars inside for loop, but there is no access to my subgraph from inside the custom function node.
    I am Imagining that any subgraph can be represented as a method with input parameters (which represents input slots) and result which represent output slot, so there should be a way how to access is from the custom function node.

    But if you dismiss this idea of accessing subgraphs from custom function nodes please create some visual nodes for loop nodes because this is so limiting
     
    keeponshading likes this.
  2. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    I wanted something like this for procedural Parallax Occlusion Mapping. I needed to call a subgraph in a loop to give my offset copies.

    So yeah - looping or similar would be great for lots of things. Raymarching and Interior Mapping spring to mind too.
     
    URocks likes this.
  3. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    159
    exactly it will open the doors for more complex and flexible shaders