Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Feedback Wanted: Shader Graph

Discussion in 'Graphics Experimental Previews' started by Kink3d, Jan 10, 2018.

Thread Status:
Not open for further replies.
  1. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,362
    Hey guys! I'm installed 2018.1.0b13 and update shader graph to use PBR Master Node, but all materials from graph are pink, any solutions? (HD Pipeline of course installed in Graphic settings)
     
  2. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    530
    Shader Graph currently only works with Lightweight Pipeline.
     
  3. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,362
    No. I’m forgot add some files from unity repo. Now it work.
     
  4. rydziur

    rydziur

    Joined:
    Jan 23, 2013
    Posts:
    2
    Hey I'm using the shader graph in 2018.1.0b12. I have created a subgraph to use for panning textures. It no longer lets me open it to edit. It doesn't recognize it as sub graph or something. It still works inside of the shader graph though. Just can't edit it.

    Also got the shadergraph through the package manager.
     
    Last edited: Mar 31, 2018
    deram_scholzara likes this.
  5. SoloChristian

    SoloChristian

    Joined:
    Oct 9, 2012
    Posts:
    623
    I am going through the Shader Editor and I have found the option for Integers and Sliders. Is there a Float Property???
     
  6. AurelWu

    AurelWu

    Joined:
    Oct 11, 2013
    Posts:
    26
    there is vector1, vector2, vector3, vector4
     
  7. SoloChristian

    SoloChristian

    Joined:
    Oct 9, 2012
    Posts:
    623
    Well that Implies at least 2 floats. Which is a bit wasteful memory-wise. I was looking to see if they had a single float property... I've actually never heard of a Vector1. Is that the Shader Editor's way of saying a Single Float Value???

    Never mind I just confirmed Vector1 is there idea of saying a float. :)
     
    Last edited: Mar 31, 2018
  8. FreeGameDev

    FreeGameDev

    Joined:
    Dec 1, 2015
    Posts:
    65
    Is there any way to do vertex movement? I am trying to port over the speed tree stuff to work with wind.
     
  9. SmartPolygon

    SmartPolygon

    Joined:
    Jan 26, 2017
    Posts:
    9
    UVChannel.jpg
     
  10. SmartPolygon

    SmartPolygon

    Joined:
    Jan 26, 2017
    Posts:
    9
    I came up with this, but it's getting clunky for each texture, and more branch cascades for each UV channel.. so any chance to set UV channel from blackboard in the future? UVChannel-idea.jpg
     
  11. Teosis

    Teosis

    Joined:
    Jan 24, 2018
    Posts:
    20
    Two questions:
    1. Is there going to be a possibility to create/handle texture arrays in the new shader graph?
    2. Is HDRP (and its corresponding shader graph) going to be included in the 2018.1 release? (Because I gather it is not included in the current Beta atm (correct me if I'm wrong), and, as the time of release draws near, I'm just wondering whether it should be actually expected to ship in the April release?)
     
  12. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,738
    vector1 is a single float. a vector is a collection of floats, nothing more.
     
  13. Art-Leaping

    Art-Leaping

    Joined:
    Apr 2, 2015
    Posts:
    8
    Would be ideal to be able to explicitly choose to write or not write to the depth buffer. That way we can do things like fresnel hologram shaders that don't render their deeper surfaces through themselves.
     
  14. Giles-Coope

    Giles-Coope

    Joined:
    Jan 5, 2015
    Posts:
    48
    Same here, sub graphs won't open in b13 and package 1.1.2-preview.
     
    deram_scholzara likes this.
  15. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
    Not yet! Still in development. :)
     
  16. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
    What are you trying to do with the UV being input into the node?
     
    Last edited: Apr 4, 2018
  17. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,738
    @Andy-Touch we can still open the HLSL shader code and manually add a "vert" function to handle this though, correct? because actually displacing verts by code is so trivial I hope this is the case.
     
  18. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
    I haven't tried it myself; but if you try it, let us know the results!
     
  19. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,738
    I will tonight :) Im sure it will work fine though, at least I cant see a reason it wouldnt
     
  20. SmartPolygon

    SmartPolygon

    Joined:
    Jan 26, 2017
    Posts:
    9
    I want this!
    Untitled-1.jpg
     
    Grimreaper358 likes this.
  21. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    311
    Just to jump ahead slightly, and hoping it's not out of scope for the shader graph, but some means of reading the position of these displaced verts would be nice. Thinking in terms of getting the y-value at a given position on a water surface.
     
    GameDevCouple_I likes this.
  22. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    530
  23. Robert-Ramsay

    Robert-Ramsay

    Joined:
    Aug 28, 2013
    Posts:
    114
    Nice, will there be the ability to re-order the properties and also commenting of nodes / grouped nodes.?
     
  24. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    530
    This is already possible, it was implemented a few months ago. Commenting will probably be in sometime soon
     
    Robert-Ramsay likes this.
  25. SmartPolygon

    SmartPolygon

    Joined:
    Jan 26, 2017
    Posts:
    9
    Yup, exactly. To be more specific: just click on the property, the blue outline will show up, then you can drag it up or down. You can also multiple select them with control key.
     
    Robert-Ramsay likes this.
  26. SmartPolygon

    SmartPolygon

    Joined:
    Jan 26, 2017
    Posts:
    9
    By the way, any chance to rise the Maximum number of shader keywords? I did literally just few shader configurations for testing purposes, and I hit the limit already.
    "Maximum number (256) of shader keywords exceeded".
    This is very concerning, since the limit is for an entire project, right?
    In a real game project scenario, this limit is actually quite ridiculous. Why there is such limitation in the first place anyway? Isn't it time to remove it already? Unreal Engine has no such limitation and works brilliantly!
    Can't you stream shaders in some way? Don't want to sound rude, but do you really have to load every shader from the entire project to the video memory? Because for my little understanding is that what you're doing?
     
    GameDevCouple_I likes this.
  27. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,738
    i echo this sentiment

    EDIT: but the part about loading, pretty sure thats because they warm the shaders before use but unsure
     
  28. SmartPolygon

    SmartPolygon

    Joined:
    Jan 26, 2017
    Posts:
    9
    Well, whatever it does, it can be really frustrating and definitely will halt your project in production pipeline at some point. My guess to overcome this issue would be better if they could load only those keywords related for the opened scene, and not for the entire project. And anyway number should be closer to thousand in my opinion. 256 is really not that big of a number, especially when you take in account all the used keywords already by Unity standard shaders, what is left for artist then, 100? Almost destroys the purpose of this whole graph editor.
     
  29. pavelkouril

    pavelkouril

    Joined:
    Jul 22, 2016
    Posts:
    125
    I tried using Material.SetVector and "mat.SetVector("_LightDir", transform.forward.normalized);" with reference to both mesh renderer's sharedMaterial, material or material asset from project files, and nothing seems to work?

    Using b13 and 1.1.12-preview versions of LWRP and ShaderGraph.

    EDIT: Also, I noticed a Texture Panner is missing?
     
    Last edited: Apr 5, 2018
  30. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    530
    This is done with the Tiling and Offset node along with a few others to get that effect. Since there isn't a Panner node by default you could also turn that into a Sub Graph to use again once you create it.
     
  31. taecg

    taecg

    Joined:
    Jun 14, 2014
    Posts:
    26
    I used it few days.and I have some questions:

    1.if I wanted cull front,what should I do?
    2.Is shader graph support LOD?
    3.How to modify the name and path?
    4.Is support multiply pass?
    5.An important question, how to optimize it in order to use it in the project?
    6.Is support lightmode: phong/blinn phong/lambert?
     
    spartawhy117, Malbers and Thrawn75 like this.
  32. astrogee

    astrogee

    Joined:
    Feb 4, 2018
    Posts:
    6
    @Andy-Touch Being such a Unity noob(and even worse shader noob), excuse me if this question was already implicitly answered, but does the absence of vertex movement mean we can't do things like outlines and glow right now? By glow I mean a glow effect that extends outside the mesh and not just a Fresnel effect.

    Will you make some kind of announcement when support for this has been added?
     
  33. Robert-Ramsay

    Robert-Ramsay

    Joined:
    Aug 28, 2013
    Posts:
    114
    I couldn't get this to work, maybe I am on a different version... I can click to highlight the property name but cannot drag to move it. On that note, is the latest version pinned to this post or located somwhere else?
     
  34. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
    Use the latest version of Shader Graph on the Package Manager. :)
     
    Robert-Ramsay likes this.
  35. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
    Glow and Outline effects are possible through other means; such as post processing.

    When Vertex Displacement is available via PackMan; ill remember to let people know in this thread. :)
     
  36. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
    The property names are generated via Shader Graph; put the Inspector in Debug Mode, select your material and you can view the property names under the Saved Properties list.
     
  37. pavelkouril

    pavelkouril

    Joined:
    Jul 22, 2016
    Posts:
    125
    Thanks, I'll try that! Are the names same for every compilation of the property, or do they change randomly?
     
  38. zzimagination

    zzimagination

    Joined:
    Nov 28, 2017
    Posts:
    2
    what do you add?
     
  39. Jjules

    Jjules

    Joined:
    Dec 25, 2012
    Posts:
    33
    Hello. I would like to know the best way to go about exporting a shadergraph as a regular shader. I'm mostly happy with the tool's functionality, but it only works in the Lightweight Render Pipeline in 2018, which doesn't support a slew of stuff I want in my project, so I want to take the shader I made in shadergraph and export it to work with other projects. I know, as mentioned ealier, that if you right click and copy a node, it will turn that node into code, but I want the entire, standalone, fully functional shader that I put together. Is there any way to do that yet? Thank you
     
  40. Adam-Bailey

    Adam-Bailey

    Joined:
    Feb 17, 2015
    Posts:
    229
    Apparently Shader Graph won't ever support the legacy pipeline.
     
  41. Jjules

    Jjules

    Joined:
    Dec 25, 2012
    Posts:
    33
    That's fine, I get that ShaderGraph is deeply integrated in the Scriptable Render Pipeline, but since it doesnt work with the HDRP yet, and that's what I'm using, I want to know of a way to turn a ShaderGraph into a fully functional .shader file as a workaround
     
  42. Hafazeh

    Hafazeh

    Joined:
    Mar 26, 2017
    Posts:
    16
    you should do the same with your attitude. it is helping solve nothing.
     
  43. andydbc

    andydbc

    Joined:
    Jan 25, 2014
    Posts:
    17
    Last edited: Apr 10, 2018
    P_Jong, BuzzJive, hugokostic and 5 others like this.
  44. Spy-Shifty

    Spy-Shifty

    Joined:
    May 5, 2011
    Posts:
    521
    Hi I have the same problem with the pink shader in the ShaderGraph!
    What did you add?

    I used the following:
    SRP: unity-2018.1.0b13
    ShaderGraph: 14e71ad
    PostProcessing 821f007

    I created a new projekt with the hdrp example. I've removed the packages from the manager and added all the repos.
    But it's still pinkt.

    Edit->Project Settings->Graphics->SRPSettings are also set correctly...
    What do I miss?
     
  45. CRISTALSONIC

    CRISTALSONIC

    Joined:
    Sep 22, 2016
    Posts:
    27
    how do you resolve this error


    Assertion failed: Assertion failed on expression: 'success'
    UnityEditor.ShaderUtil:CreateShaderAsset(String)
    ShaderGraphImporter:OnImportAsset(AssetImportContext) (at /home/micha/.config/unity3d/cache/packages/packages.unity.com/com.unity.shadergraph@1.1.2-preview/Editor/Importers/ShaderGraphImporter.cs:75)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)



    P.S. I installed Shader Graph 1.1.2 via the new Package Manager
     
  46. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,781
    Shader graph is only for Lightweight render pipeline
     
  47. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    530
    Currently, you can use it with HDRP and specific branches of shader graph from Github. The full version of Unity 2018.1 will be out sometime soon (almost only two weeks left in April) and it will be officially released with HDRP (Still Preview/Experimental) so not too long before everyone can play with it.
     
  48. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,781
    How we can access to the proprieties using scripting ?

    Great news
    I couldn't find HDRP version (pink in current update)
     
    Last edited: Apr 12, 2018
  49. Spy-Shifty

    Spy-Shifty

    Joined:
    May 5, 2011
    Posts:
    521
    Is it the HDMaster branch?
     
  50. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    530
    That could probably work as well, the branch I used was HDMasterMerge. This was a little while ago though (almost two weeks) so things most likely have changed
     
    Spy-Shifty likes this.
Thread Status:
Not open for further replies.