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 Post processing generated code vs SRP custom mods

Discussion in 'Shader Graph' started by snacktime, May 27, 2020.

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I'm trying to sort out the potential downsides of using the generated shader code.

    One concern is that using generated code isn't something Unity will fully support. As in it could break if they decide that it's not worth it to make it work in some context. Maybe generated code working is just a happy coincidence and not actually an intended use case.

    Another is maybe there are performance concerns. I don't know how the paths differ in terms of SG -> compiled shader and generated code -> compile shader.

    And of course they could decide to just change the structure of the shader code. Any tooling we build around modifying generated code seems inherently brittle.

    So all things considered modifying/adding to SRP seems like the best route. At least for game makers, I get why asset store authors would take the generated code route.

    Anything I'm missing here that should change my mind?