Search Unity

Feedback Shadergraph is ugly and slow

Discussion in 'Shader Graph' started by l33t_P4j33t, May 6, 2020.

  1. l33t_P4j33t

    l33t_P4j33t

    Joined:
    Jul 29, 2019
    Posts:
    232
    I find a couple of the design choices of shadergraph as opposed to other shading software highly disagreeable. Amplify shader is probably the best shader editing software for unity and if you compare two screenshots of amplify vs shadergraph, there's just a night and day difference:




    I particularly liked Amplify's use of different green blue and cyan colorings for different types of nodes. exposed groupings and purple grba channel indicators


    even the free but now obsolete shaderforge does a very good job. take a look at this:


    vs this:


    both the same shader. but shaderforge is just so much cleaner and more concise and comprehendible, thanks to its curved lines, fast snappy interface, multiple rgba channel lines, color indicators for different nodes and highlighting of possible connections once you start dragging. you should be able to get a general idea of the shader just by looking at it. i honestly cannot at all understand what the shadergraph image is supposed to be despite me having made it.

    shadergraph completely does not feel snappy at all. there is a very clear 3 second delay on every action you do whether connecting nodes or creating new nodes. there were some notable bugs that took months to fix, like where right clicking on a node would crash unity entirely or ,unbeknownst to me at the time, hiding the preview image would softlock shadergraph and spit out some unhelpful errors in the console. no such thing in the other shader editing software despite them both being community driven. i'm still encountering a softlock a couple times on a daily basis where letting go of left click doesn't stop dragging a node, requiring a unity restart. although i am unsure of the cause




    shadergraph also lacks allot of general purpose nodes and is generally less complete of a shader editing software. i know this might have to do with unity's philosophy of complete simplicity over more features it seems, but it would be nice to see some repository of commonly used shader nodes, and more repository of standard assets in general in other parts of unity

     

    Attached Files:

    Last edited: May 6, 2020
    mgear, PutridEx, andybak and 3 others like this.
  2. TX_DQS

    TX_DQS

    Joined:
    Jan 21, 2022
    Posts:
    1
    no good to use, ugly, bad feel, dont't know why not to make a better software experience.
    ASE is the best so far.
     
    MP-ul likes this.
  3. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    Well Shader graph is only able to make shader forge cry from its grave =))
     
  4. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    While it is totaly ok to express opinions, it seems to me that this thread is pointless and the reason is simple - you are commenting your personal preferences without constructive criticism. The only part I can agree is about graph performence, but it is way better now as OP posted this almost 2 years ago.
    Personally I think both can be considered ugly, especially curved spaghetti :D
     
    daneobyrd likes this.
  5. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    44
    Reviving this thread, it's still slow in Unity 2021.2.

    It's fine for small graphs, but once you start trying to make something serious (with at least the capabilities of the Lit Shader), the time to do anything scales exponentially. Takes 1-2 minute for me now to add or rename a parameter, or save a graph, quickly making things unworkable.
    It seems like it maybe recompiling all variants every time something is changed, so as you add keywords and complexity, the time grows. I think there should be an option to disable this auto-refresh or auto-compile, until the end.

    Other silly thing is it runs out of memory after around 15 - 20 keywords, limiting development of ubershaders. I have other features I want to add, but I can't after a certain point as the UI is unresponsive and that limit is not that high either.

    It's a cool product and I like it, but it's slow now.
     
    Last edited: Mar 17, 2022
  6. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    @OmniShader I don't know how big your graph is, but if this is as slow as you described (2min to do anything), then you should consider reporting the bug. Accoring to the roadmap it should be even faster from 2021.2, maybe they introduced some new bug (I assume your PC is not slow).
     
  7. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    742
    The bigger issue is the sheer lack of nodes that most other software have. Trying to replicate shader effects from tutorials using other software such as Blender/Substance/Unreal - its clear they have a bunch of nodes that shader graph lacks and it feels intentional. I noticed this when dealing with noise gen.

    Unity offers 3 basic noises and only voronoi is half decent the rest are slow and not particularly useful. There's no octave/lacunarity or roughness settings or anything useful. Yet typically, you can go on the asset store and buy multiple noise nodes of which, unreal provides them all for free. Its absurd and ridiculous. As no surprise the one i am seeking is not on the store so i'm stuck implementing my own which is beyond my skill level, and i want to make games no math libraries for noise gen.

    And yes it is noticeably slower than other editors out there. The preview window some times doesn't display / update until you click on save, it is certainly not updating as you edit nodes which is annoying because saving isn't particularly fast either.

    Shadergraph gives me the impression that Unity's mindset is "this is good enough if they want anything else they can buy it off the asset store". Which takes the cake when you have Unreal offering it all for free and Godot also catching up offering it for free.

    The roadmap shows no indication of more nodes coming either. So shadergraph although functional is hardly thriving with features.
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Learn:
    • elbow nodes
    • custom functions
    • sub graphs
    • collapsing
    Before rendering judgement.
     
    REDACT3D_ likes this.
  9. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    742
    So the answer to lack of nodes is custom nodes? If so you didn't read my post at all. I have no real complaints about the "messy" aspect of shadergraph - its not that messy imo.
     
    PutridEx and MP-ul like this.
  10. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Well, first off, it's the same in Unreal land. Plenty of missing things. But also plenty of ways to make it or get hold of it. Same for Unity - there are many node libraries for shadergraph on github or around. Check 'em out.

    As for Unity adding them, they totally should do what you want, but I'm pretty sure they won't in time for your use case.
     
  11. unfa

    unfa

    Joined:
    Oct 10, 2019
    Posts:
    13
    I have come here to maybe find a solution to why changing a connection in an ubershader I made with ShaderGraph takes 45 minutes now, but it seems nobody has a solution to that. RIP me I guess.
     
  12. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    45 mins seems excessive. You totally should report a bug with that shader in it and drop a case number here.

    I don't see how it's possible to be honest, without something fundamentally broken.
     
  13. unfa

    unfa

    Joined:
    Oct 10, 2019
    Posts:
    13
    Some details of what I'm doing with ShaderGraph:

    I have an ubershader that is built from 8 SubGraphs.
    The 1st SubGraph takes and maps the base material textures (BaseMap, Maskmap, Normalmap) and outputs all PBR channels (Albedo, Metallic, Smoothness, Normal Map, AO, Emission, Celarcoat, Alpha) and this is all passed through a series of SubGraphs that all take these inputs and put them out applying some effects (dirt, damage etc.).

    Each effect SubGraph takes about 6 extra control inputs that are routed from the ubershader's parameters to provide full control over each effect.

    All effect SubGraphs feature a bypass mode enabled wit h a boolean.

    When I alter any connections in the ubershader ShaderGraph Unity shows me this:

    upload_2022-9-21_19-8-36.png

    And this wait time has been increasing with ubershader's complexity. At first it as a couple seconds, then minutes, then a quarter, half an hour, now 45~50 minutes. I have tried disabling asynchronous shader compilation.
    If I was able to manually trigger this operation after I've done my work, that'd be... bearable. As it stands if I want to plug in another effect SubGraph I'd have to spend 23 * 50 minutes just routing the connections. And that is assuming the time won't get longer. And it surely will get longer. It'll probably double, so let's assume 23 * 90 minutes. That's 34 hours in real time. Even assuming best case scenario where it'd be just "only" 15 minutes per mouse click that's a whole workday spent on something that should take 5 minutes tops.

    I could probably learn how to edit ShaderGraphs in a text editor in that time.

    This seems like an optimization problem. I've tested this on another person's machine and they reproduced by problem so this isn't specific to my hardware of OS. Anyway, the hardware I am using is a Ryzen 9 3900X, Radeon RX6900 XT, and 32G of RAM, so I don't think I can blame my hardware.

    ---

    I could make a bug report, but I doubt Unity would do anything about it.
    With Godot engine I can talk to the developers directly and I have had them fix issues I've reported, but with Unity's size there's no way I'm going to reach anybody. They're probably more busy implementing ad serving for mobile anyway.
     
    Last edited: Sep 22, 2022
  14. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    Unity version?
     
  15. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,058
    Bug reports get processed. Some faster than others.
    It's the only way to report something directly to the team making the actual engine, so if you want it fixed at least make a report. It's a lot faster than the 45 minute wait (;
     
    Qriva likes this.
  16. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437

    lol well you perhaps left out the most import information
    Unity version?

    i dont use ShaderGraph a lot and prefer to use amplify
    i recall pre api version 10x was extremely slow and problematic
    after api 12x unity improving with multi_compile_fragment its like night and day

    regardless of unity versions, certain functions such as using of too many static switches can slow compiles down... Turning off "asynchronous shader compilation" is more a pre 10x recommendation and not really relevant any more in current versions and turning it off may even mess you up in that now its so deeply integrated
     
  17. unfa

    unfa

    Joined:
    Oct 10, 2019
    Posts:
    13
    Thanks, the Unity version I am working with is 2021.3.0f1.
     
  18. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    holy smokes bud, just dropping nodes like an animal over there lol

    i mean if you spend time to make it look clean, even just collapsing some nodes does the trick.
    Capture.PNG
     
  19. unfa

    unfa

    Joined:
    Oct 10, 2019
    Posts:
    13
    Hmm. I am using a lot of Branch nodes to allow the Ubershader to bypass processing that is not needed for optimized rendering.

    Could that be a problem?
     
  20. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    Unity waiting 45 min + regardless is a bit crazy
    the largest shaders such as terrain only take me less than 45 seconds

    but i use amplify and for URP 12x working in 2021.3.10

    Note it's called LTS yes however it has different api versions within it, so optimizations Unity does in the latest LTS don't always roll back into the lowest api with in a cycle. if it does roll back, it can take weeks or months for the PR t get approved....

    perhaps try the latest LTS see if you still have the same issues
     
  21. manuelcuencagarca

    manuelcuencagarca

    Joined:
    Oct 4, 2021
    Posts:
    4
    Im working in a project where we need a shader that overlaps textures for make up.
    I have a shader that has a lot of inputs:
    1 color, 1 texture2D for albedo, 1 texture2D for normals metalic smoothness per "layer" then we blend the textures together.
    The thing is that in the end you have a LOT of nodes doing the same thing, so i converted each layer as a subgraph.
    It is then where the problem starts.

    Having 5 nodes per layer (14 layers) is Much Much faster than doing a subgraph of those 5 nodes:
    I created a subgraph of those 5 nodes i repeat and started connecting, and about when i was finishing it started getting slow as i was connecting more and more subgraphs...
    To the point where i was waiting 10+ minutes each connection.
    The images are:
    -The node tower (fast)
    -A layer using nodes VS subgraph of those nodes
    -The subgraph tower (every time i have to connect something i have to wait 10 minutes and it gets worse each time)

    TL:DR -> Subgraphs are buggy or something, when i used them it started getting slower and slower
     

    Attached Files:

  22. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,058
    Please make a bug report with an example graph attached so it can be fixed. If you already did, please share the ticket ID
     
  23. tutorial4unity

    tutorial4unity

    Joined:
    Apr 14, 2019
    Posts:
    14
    Hey how did you put that beautiful yellow group? I couldn't find a place to set color of groups
     
  24. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    This is sticky note
     
  25. tutorial4unity

    tutorial4unity

    Joined:
    Apr 14, 2019
    Posts:
    14
    Cool! Learnt something new!!

    Question: Is groups then essentially useless?
     
  26. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    I don't understand what you mean. Group is just bonus thing to organize nodes, nothing more, nothing less.
     
  27. tutorial4unity

    tutorial4unity

    Joined:
    Apr 14, 2019
    Posts:
    14
    Yeah I got what you mean, gave it a try. Stickies are purely cosmetic, while groups become parents to hold and carry nodes with it but then they don't have the beautification features.

    Feels it should have been a single thing with both features, they don't need to be exclusive. Makes a good feedback to Unity.