Search Unity

Resolved Turning shader code into SG node

Discussion in 'Shader Graph' started by lifeisabeach, Jul 13, 2021.

  1. lifeisabeach

    lifeisabeach

    Joined:
    Apr 26, 2020
    Posts:
    47
    Hi!

    I'm beginning to program simple shaders from the need to have specific procedural patterns in my game.

    I have managed to create a simple shader working, with one of the patterns I need (an arrow, basically using conditionals on the fragment function).
    But I want to tile it, and if possible combine it with other nodes.
    I am wondering if it is possible to bring the code as a shader graph node.

    I have looked at 'custom nodes' but I am not clear on how to add logic into its computations.

    I am considering trying to implement the logic using the nodes in shader graph, but it seems like overcomplicating things for a simple code logic.

    If anyone has ideas on how to integrate procedural patterns in code and the shader graph, I'd really appreciate it to hear it.

    Thanks!
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    lifeisabeach likes this.
  3. lifeisabeach

    lifeisabeach

    Joined:
    Apr 26, 2020
    Posts:
    47