Search Unity

[RELEASED] ShaderGraph Essentials (SGE)

Discussion in 'Assets and Asset Store' started by ph_, Mar 19, 2019.

  1. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Download ShaderGraph Essentials from the Unity Asset Store !

    Screenshot_01.png Screenshot_02.png Screenshot_03_update.png Screenshot_04.png Screenshot_05.png

    ShaderGraph Essentials
    - All-in-one performant noise node, new master nodes and features to push your shaders to a whole new level !

    Now with support for 2020.1!

    Download ShaderGraph Essentials from the Unity Asset Store !

    TLDR
    ShaderGraph Essentials adds unique must-have features to ShaderGraph:
    - 30+ noises node
    - generate a texture from any node in the graph (in editor)
    - 3 additionnal master nodes (Unlit, SimpleLit, Toon) with more parameters
    - custom lighting node so you can code your own lighting using HLSL
    - water shader with vertex displacement (CPU / GPU) and dynamic foam

    Overview
    ShaderGraph Essentials is a unique bundle of nodes to complete what's already existing in ShaderGraph. Features include 2D/3D Perlin noise, Simplex, Value, fractal / turbulence / ridge variances, periodic / non-periodic variances, the ability to bake textures from any node in your graph AND a Simple Lit master node. Yes, the equivalent of the "SimpleLit" shader in LWRP ! Oh, did I mention there's also a toon lighting node ? And that you can implement your own lighting function to work in ShaderGraph ? Include full source code, demo scenes with various effect (procedural wood, procedural normals, lava, explosion, light beam, dissolve ...). It's also a very good start if you want to do your own master node, as you'll clearly see how I did the SimpleLit one.

    Value and performance
    You could spend hours working on the noises that are missing in ShaderGraph (Perlin, anyone ?). Or you can get ShaderGraph Essentials and have 30+ noise variations, easy to use through a single node and already optimized to be as fast as possible ! The ability to bake noises you've created will help you optimize your game, as well as using the SimpleLit master node instead of the PBR one. ShaderGraph Essentials nodes have been tested on mobile, VR on PC, low-end and high-end PC. It's a must-have if you plan to use ShaderGraph or are already using it.

    Noise node
    A one-in-all noise node, with a powerful UI that let you iterates quickly in ShaderGraph. Features Simple value noise, Simplex, Perlin2D and Perlin3D. In addition every noise can be tillable (periodic) or not; and you can enable Fractal, Turbulence or Ridge combination in one clic !

    Generate texture node
    A node that let you bake the output of any other node in a texture. This is extremely useful when you've got a group of node that is static according to the UV mapping of your mesh. You can optimize your graph by baking part of it in a texture, then using it instead of your baked graph. This node gives you the performance of a texture AND the iteration time of ShaderGraph, as you'll continue to work and generate your texture in ShaderGraph.

    Simple Lit master node (LWRP only)
    The equivalent of LWRP Simple lit shader. A must have if you use LWRP and care about performance (especially on mobile). Many assets or scenes don't need to support and execute the full PBR shader and this node gives you the power to use a much faster lit master node.

    Custom lighting and toon lighting (LWRP only)
    A master node that let you code your own diffuse and specular lighting functions using HLSL. A MUST HAVE if you used one in classic shaders, there's no way you can do without it ! As an example I implemented a toon lighting node that reacts correctly with shadows and additional lights!

    Water shader
    A water shader featuring vertex displacement and dynamic depth-based foam.
    Such shader can't be done at all without this plugin, as the default ShaderGraph master nodes have a bug that makes it impossible.
    It's 100% made in ShaderGraph so you can tweak the shader to your needs!

    Support
    I'm dedicated to make this asset the best collection of nodes and features for ShaderGraph. I answer to email and do my best to fix bugs and implement feature request. Please don't hesitate to contact me for feedback, ideas or bug report at ph.graphics.unity@gmail.com
    You can also come and chat on Discord at https://discord.gg/ksURBah
    For an in-depth explanation about all features, you can have a look at the online documentation.

    Requirements
    - 2018.3, any 2019.x or 2020.1
    - latest LWRP / URP / HDRP / ShaderGraph available package
    - ShaderGraph Essentials requires one license per seat

    Download ShaderGraph Essentials from the Unity Asset Store !
     
    Last edited: Aug 9, 2020
    Gekigengar likes this.
  2. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.0.1 has been released on the asset store ! Download it here

    Changelog:
    • Fixed a bug in SGESimpleLit and SGEUnlit master nodes that made it impossible to work on Mac/Unix systems.
    Thanks to the kind user that reported this !

    I also have a LOT of features coming in, with a lot of new noises as well as other utility nodes.
    I am only waiting for Unity to decide what they do with the node API in 2019.x before I can publicly announce the roadmap for ShaderGraph Essentials !
     
  3. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.0.2 has been released on the asset store ! Download it here

    Changelog:
    • Added support for 2019.1! If you update from 2018.3, please delete and re-download ShaderGraphEssentials to make sure you get the correct version.
    Now that support for 2019.1 is out of the way (it was a complicated one), I can now focus on more interesting features!
     
  4. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Hi there, we've just updated to Unity 2019.1.0f2 and I've gotten this latest update v1.0.2, but I'm seeing 179 compile errors!!

    I've definitely got the latest update. I removed the older plugin folder completely, checked the changelog to make sure. This is a MAJOR show stopper for us. Examples of errors, 179 of them:

    Assets/ShaderGraphEssentials/Plugin_Base/Editor/Scripts/Noises/SimplexNoise.cs(67,50): error CS0122: 'FunctionRegistry' is inaccessible due to its protection level

    Assets/ShaderGraphEssentials/Plugin_LWRP/Editor/Master Nodes/SGESimpleLitSubShader.cs(154,133): error CS0122: 'SurfaceMaterialOptions' is inaccessible due to its protection level

    Assets/ShaderGraphEssentials/Plugin_Base/Editor/Scripts/Nodes/NoiseNode.cs(28,85): error CS0122: 'IMayRequireMeshUV' is inaccessible due to its protection level

    Assets/ShaderGraphEssentials/Plugin_LWRP/Editor/Master Nodes/SGEUnlitMasterNode.cs(92,9): error CS0122: 'SurfaceMaterialOptions' is inaccessible due to its protection level
     
    ph_ likes this.
  5. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Hi there !
    Don't worry, these errors can be fixed :)

    If, as you say, you removed the ShaderGraph folder and got the 1.0.2 version, can you try to close and reopen your Unity ? This fixed the problem to me.
    If it doesn't fix the problem, please continue the conversation via Discord (https://discord.gg/ksURBah) for a quick-instant help; or email (ph.graphics.unity@gmail.com) but this won't be as fast.
     
  6. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Thanks that was a super fast response and super helpful to work through that issue on discord cheers. For anyone else encountering the issue it was related to file permissions on mac. I'm sure the dev will provide more info or a fix if you encounter the same issue.

    ^ thx again
     
    ph_ likes this.
  7. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    I just released a new version 1.0.2c (the "c" doesn't appear on the Asset Store but it's not a problem at all), which fixes @jason_yak 's problem that we found yesterday. We fixed the problem directly on his mac back then, but this is the proper automatic fix for everyone to enjoy!
     
    jason_yak likes this.
  8. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    I just released version 1.0.4, with new goodies for 2019.1 / LWRP !
    Please note that those features need ShaderGraph 5.13+, so if you update ShaderGraph Essentials please update the ShaderGraph package at the same time.

    - Added new Custom Lighting master node (LWRP / 2019.1 / ShaderGraph 5.13+ only)
    - Added new Toon Lighting master node example (LWRP / 2019.1 / ShaderGraph 5.13+ only)
    - In all master nodes, added a "CustomEditor" setting so you can specify custom editor scripts like in regular shaders.

    The price was also increased from 9.99$ to 14.99$ as those features are long time requested and bring a lot of value to most users. The custom lighting in incredibly powerful!
    Of course I'll continue to add features, which will be free to anyone that already bought ShaderGraph Essentials (thank you for the support !).

    toon_lit_master.png
     
  9. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Ohhh cool. Sounds awesome, keen to check these custom lighting nodes out =)
     
  10. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Thanks jason ! You can look at the documentation, the video (the last half is all about custom lighting function) and the toon lighting shader for example! And of course you can always contact me :)
    Cheers,
     
  11. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    This sounds really cool. I was just wondering, so is this new ability to have a custom function in SG v5.13+, is kind of the new replacement for the old custom nodes that were removed?
     
  12. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Yes, but it's nowhere near as powerful (if you read this post you'll understand https://forum.unity.com/threads/custom-nodes.662731/).
    You can write simple functions or link an existing file, with some limitations.
    But you can't do master nodes, custom UI ...etc
     
  13. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Also, I was just wondering, we have hit this really annoying limitation with Shader Graph and seeing as you tool opens up many possibilities and you know a lot about pushing the boundaries of what is possible with SG, I was just wondering if you have any ideas of how to solve this or whether SGE has the ability to work around the limitation perhaps.

    We're trying to produce a toony water foam edge effect that relies on depth testing to occur after a vertex manipulation pass. So we're fairly sure we're likely to need to have a multi-pass shader, the first pass wouldn't be lit though is should work with LWRP. So first pass to change the verts of a mesh doing some wave movement, and then we need to do depth testing after moving the verts. Then I guess final pass to use the depth data and render the fragments.

    It just seems that whatever we do in Shader Graph, that depth testing occurs before the vertex manipulation and then when we go to use that data it has inaccurate results. Any ideas how to be able to control the depth testing to happen after changing the vertices?

    Thanks =)
     
    ph_ likes this.
  14. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Right, thanks for the link.
     
  15. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Doing a water example with depth testing is on my TODO list for ShaderGraph Essentials :p

    I'll get back to you later (probably tonight) with a quick example but I don't think you need multipass here!
     
    jason_yak likes this.
  16. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Much appreciated, thank you so much! =)
     
  17. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Just released a new minor version (1.0.5) on the asset store!
    • Updated SimpleLit master node to follow what Unity's been doing on LWRP/SimpleLit shader (the SimpleLit master node should be exactly the same as Unity's LWRP/SimpleLit shader now).
      • Removed Glossiness node (it wasn't used)
      • Renamed Shininess to Smoothness
    • Added a new fix for "Internal Errors" that some users were getting when opening ShaderGraphEssentials the first time (and sometimes on later open too).
     
  18. jcfalcone89

    jcfalcone89

    Joined:
    Jun 17, 2015
    Posts:
    11
    I'm getting errors with the asset, looks like they changed the API in the last LWRP

    Code (CSharp):
    1.  
    2. Assets\ShaderGraphEssentials\Plugin_Base\Editor\Scripts\Nodes\NoiseNode.cs(299,96): error CS0122: 'GenerationMode' is inaccessible due to its protection level
    3.  
     
  19. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Hi there!
    I'm sorry your first interaction with the plugin was an error.
    I've just checked and there hasn't been a ShaderGraph update for a while, so 5.13 is still the latest one and the one you should use.
    In the past I've cleared most of the error but this one is a complicated timing import issue. I'm working on the proper fix for the next version, which will be to have a proper "Getting Started" window which will import everything in the correct order.
    Anyway, the good news is, there's an easy way to get rid of your errors:
    • reimport the file "ShaderGraphEssentials/ShaderGraphEssentials.asmdef" (right clic -> reimport) and only this file. This will force all the scripts to reimport and recompile.
    • Then, if you still have errors in the console. Clear it. If it persists, close Unity and reopen it.
    • You should be fine after this.
    Don't hesitate to poke me back if your still have problems or questions; and if you want a faster reply feel free to come and chat on discord https://discord.gg/ksURBah
     
  20. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.0.6 has just been release on the asset store!

    Please when updating to this version, delete your old "ShaderGraphEssentials" folder and download the new one: the location changed!
    Other changes:
    • Introduced the "Getting Started" window. It's useful to both existing and new users!
    • Restructured how file are organized in the plugin. Also moved the entire plugin from Assets/ShaderGraphEssentials to Assets/Plugins/ShaderGraphEssentials. This has been requested by many users as to reduced the visual clutter of the root folder (as the plugin can't be moved at the moment!).
    • Moved the menu items from SGE to Tools/ShaderGraph Essentials for the same reasons.
     
    Last edited: Jun 6, 2019
  21. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.0.7 has just been released on the store!

    Several bug fixes:
    • Fixed a bug with the default custom lighting graph, referencing a wrong path (hlsl file).
    • Fixed a minor bug that was throwing an GUI error the first time the Getting Started window was opened.
    • Fixed a bug that blocked the Getting Started window to import the HDRP package or demo scenes
     
  22. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.0.8 has just been released on the store!
    • If you're on Unity 2019.1.3 or newer and using LWRP, then you need to update to LWRP/ShaderGraph 5.16.1 when getting this version.
    • Fixed a bug in SimpleLit / CustomLit shaders. The bug was giving errors in editor, but the shader was still working in editor and in builds.
    • Fixed the version number in Getting Started window being wrong.
     
  23. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.0.9 has just been released on the store, adding support for Unity 2019.2!

    SGE_key_516x389_2.png

    • Only impacts 2019.2; if you're on 2018 or 2019.1 it's not useful to update.
    • Add 2019.2 support (require ShaderGraph / SRP 6.9.1 and not 6.9.0 which contains a bug with custom functions and subgraphs). If you update from 2019.1, please delete the ShaderGraph Essentials folder and re-download the new one after upgrade to make sure there're no leftover files.
    • Removed some demo shaders that were unused and fixed minor bugs in other demo shaders
    Come and chat about it on our discord server https://discord.gg/ksURBah
     
  24. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.1.0 has just been released on the store!
    This version adds a new water-shader demo scene, with few changes internally in master nodes to supports it! And it's 100% made in ShaderGraph, so it is very easy to adapt it to your needs!
    I'm quite happy with the visuals:
    Screenshot_06.png
    Screenshot_07.png

    A few information:
    • Demo scene is included
    • Water shader features vertex displacement (CPU or GPU, your choice!) and dynamic depth-based foam!
    • Added an online documentation for all features
    • Re-did the asset store plugin page
    • The price has been increased to reflect the amount of work put in there, but the update is free for all existing users as a thank you for your early support!
     
    Last edited: Sep 19, 2019
  25. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.1.1 has just been released on the store!

    This version adds support for Unity 2019.3 (starting with 2019.3.0b11 and above).
    If you are on a previous version of Unity, there is no need to update as there is literally no changes.

    If you have any problem with SGE feel free to report it here or in the now quite active discord server! https://discord.gg/ksURBah
     
  26. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Hi there,

    Just imported SGE to play around with the noise and bake features. Upon importing the HDRP version, creating a new Unlit HDRP Shader Graph, and adding a SGE Noise, when I change the noise type to "Simplex", I get a weird diagonal line artifact in the middle of the noise.

    I thought this could just be an oddity in the Shader Graph small preview window, but it shows up also when I bake the texture. I could simply set an offset using the "Tiling and Offset" node to choose a part of the noise that doesn't have the artifact, but just wanted to mention that it was there. Also a slight spelling mistake with the Period input spelled as Periode, unless the word is purposely written in a different language than English.

    Cool asset. I'm using it to generate some terrain textures for procedural planets, and appreciate the bake feature. Will review in the future.
     
  27. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Thanks for the feedback, I do get the same line artifact. I'll look into it and fix that, glad you could bypass the problem for now.

    That is indeed a mistake!

    Thanks for pointing out this issues. If you have any feedback on the bake feature, please do not hesitate! I don't think I got many on this specific feature.
    If you've done some interesting stuff with SGE, feel free to post them here or in our discord channel (https://discord.gg/ksURBah)

    Cheers
     
    Korindian likes this.
  28. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.1.2 has been release on the asset store!
    Changelog:
    - [2019.1][2019.2][2019.3] Improving SGE registration. This should solve most errors when updating URP or Unity and getting "is inaccessible error". If you still have an issue similar to this, please contact me on Discord
    - [2019.2][2019.3] Better support if you have ShaderGraph package locally in your asset folder.
    - [2019.3] Fixed a compilation error starting from 2019.3.0f6 (with URP 7.1.8).
    - [2019.3] version now requires at least URP 7.1.8 to work. - [2019.3]Typo fix: "Periode" to "Period".

    Version 2019.3 is properly working, please use at least version 2019.3.0f6.
    As usual contact me (on discord for quicker support) if you have any trouble!
     
  29. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Hey there, In need of more dithering algorithm to choose from the Dither Node.
    And definitely would be great if the dither node have a setting to choose the matrix level,
    something like this procedural bayer matrix.

    Would purchase for sure if its included! :p
     
  30. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Great idea and probably not complicated to SGE noise node. That's noted!
     
    Gekigengar likes this.
  31. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738

    Also, another request, Voronoi with Manhattan distance to produce circuit-board like cell shapes.
    Definitely opens up a lot of potential for procedural textures!

    Source : https://www.alanzucconi.com/2015/02/24/to-voronoi-and-beyond/
     
    ph_ likes this.
  32. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.1.4 has just been released on the store!

    Changelog:
    • 2019.3 version now support and requires URP / HDRP 7.2.1.
    • If you are on 2019.1 or 2019.2, this new version will bring no new changes.
     
  33. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.1.5 has just been released on the store!

    Changelog:
    • Added 2020.1 support.
    • 2020.1 only: Completely changed how the plugin integrates with ShaderGraph. It is much more robust, and will be backported to 2019.x later if no issues are found.
    • 2020.1 only: Fixed possible NaNs error when using 3D perlin Ridge noise node. Will be backported later. - 2020.1 only: Renamed all "LWRP" instances to "URP". Will be backported to 2019.3 later.
    • 2020.1 only: Fixed all scripts warnings.

    Please don't hesitate to ask here or on Discord for support and / or feature requests :) Have a great day!
     
  34. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Version 1.1.6 has just been released on the store!

    Changelog: Backport to 2019.2, 2019.3, 2019.4:
    • Completely changed how the plugin integrates with ShaderGraph. It is much more robust now, and should help if anyone had issue with automated build systems ...etc.
    • Fixed possible visual artefacts caused by NaNs error when using 3D perlin Ridge noise node.
    • Fixed all scripts warnings.

    Enjoy and have great day y'all! :)
     
  35. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,347
    Hi, great asset, thanks for making this!

    I have a problem after installing with Script Debugging, simply put SGE breaks debugging from Visual Studio for me (Unity 2018.4.1f1, URP 7.3.1, ShaderGraph 7.3.1, Target: Android, Devmachine: win 10,
    Microsoft Visual Studio Community 2019 Version 16.4.6). I am not (yet) using asmdef's in my project.

    I am using SGE 1.1.5 from the Package Manager, 1.1.6 does not yet show up here (show preview packages is on).

    Here is a screenshot of the errors I get whenever I try to attach to Unity (VS build fails). If I remove SGE from the project then everything works just fine. I guess it's a namespace issue in the Editor classes. Any hints on how to fix this quickly?

    SGE-debug-errors.png

    Thank you
     
    Last edited: Aug 15, 2020
    ph_ likes this.
  36. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Hi there! Thanks I'm glad you are enjoying the plugin :)

    I don't think that URP 7.3.1 is available for 2018.4, so I will assume that you probably wrote a small mistake and that you are using 2019.4 instead. Let me know if it's incorrect!

    That being said, ShaderGraph Essentials version 1.1.6 should definitely be available for you if you are on Unity 2019.3/4.

    Can you try to follow these steps, then redownload the plugin and try again? I just did it on 2019.4 and it correctly downloaded the 1.1.6 version.
    http://assetstore.phbarralis.com/sge/how_to.html

    Please let me know how it goes! ;)
     
  37. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,347
    Yes you are right, my appologies. I am for course using Unity 2019.4.1f1.

    Here is what I did now:
    1) Removed SGE from the project (completely deleted the folder in Unity and removed the package in %appdata%..)
    2) Reimport from the Asset Store (package manager does not show the newest version), see screenshot
    3) Restart Unity ('cause you never know ^^), then Start Visual Studio (M$ loves restarts anyhow).
    4) Choose a random line in my code, add a BreakPoint and hit "Attach To Unity"
    5) VS failed to build and asks if you want to use the last working Build.

    So in total I am sad to report that nothing changed after reimport. It's weird that VS does not recognize the ShaderGraph namespace, or parts of it. Do I need to link it somehow if using URP? Btw. the builds work just fine, it is just the debugging that fails (which is annoying). I have already considered diving into the code and ripping out the stuff I don't need. I purchased it primarily for the Shader Graph Simple Lit Master Node.

    I have attached a complete error log.
    Thank you.
     

    Attached Files:

  38. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Thanks for the detailed report, I was able to reproduce the issue!
    I didn't see it earlier because it doesn't show up with my IDE (Jetbrains Rider), but using VS2017 I get the same issue you do.

    The root of the issue seems that either Unity doesn't properly generate references when using Assembly Definition Reference (which SGE uses), or that it shouldn't include SGE projects in the solution to begin with (which would make sense, because most users don't need to debug / recompile it).
    I will sort this out and open a ticket with Unity to understand what is going on.


    In the meantime, I was able to work around the issue by checking "Generate .csproj files for: Registry Package" in Preferences => External Tools.
    upload_2020-8-15_21-13-8.png

    This causes the missing reference projects (ShaderGraph and URP) to be added to your solution, in which case the reference works.

    Let me know if this is an OK temporary workaround for you, and anyway I'll get back to you with more information regarding this issue.
     
  39. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,347
    Thanks, that did the trick. I didn't think of checking the third party settings, should have tried that.
    I left a nice review for you in the Asset Store :)

    Btw., how is Rider for Unity these days? I remember trying it out in the beta a long time ago, but some things just didn't quite work. Been using JetBrains IDEs for WebDev for years, they are awesome.
     
    Last edited: Aug 16, 2020
    ph_ likes this.
  40. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Thanks for the review, it is deeply appreciated!
    I've sent a report to Unity with a simple repro project (even without SGE).

    Regarding Jetbrains IDE I'm the opposite, never used it for WebDev (is it good? Doing some right now and was wondering if I should get PyCharm!), but used Resharper, Resharper C++ and now Rider for a couple years.
    I has a lot of nice feature that Visual Studio is catching on step by step, but the thing I like most is that it's blazing fast. Even on medium projects (20+ programmers), it's still super fast to launch, fast to attach to Unity ...etc.
    I'm not affiliated with Jetbrains in any way :D
     
  41. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,347
    I have not yet used PyCharm but IDEA, WebStorm and PhpStorm, so not much I can tell you regarding PyCharm.

    What I really like in JetBrains IDEs is their feature completeness, you will get a full featured ftp client, auto deploy features, integrations for things like vagrant, containers, vcs, shell/ssh, sass, less, coffeescript (you name it, it's there), local versioning (without git, so you'll never suffer from "forgetting to commit"), REST testing tools, plus all the nice community plugins. But what got me initially was their excellent search for all features and settings. This is one of the things that annoys me the most in other IDEs.

    Quote: ".. fast to attach to Unity ..".
    Hm this could be the killer feature for me. I really hate how long it takes VS to attach to unity. Sometimes it even crashes or freezes, very annoying.

    Quote: ".. it's still super fast to launch .."
    Okay, that's in stark contrast to my experience. VS starts way faster on my Win10 machine than any Jetbrains IDE. Once they are up it's all good but it takes a while. I always cringe if I close them by accident ^^.

    If I may add a feature request: I would love to see this shader (https://roystan.net/articles/grass-shader.html) getting the SGE treatment. I just stumbled across it recently. Not sure if it's even possible with URP on mobile but it would be really nice. Would also make for a very nice feature for marketing SGE (am I pushing too hard :D).

    Anyhow, keep up the good work and I hope your asset generates enough sales to be worth it (most of mine don't). It's a steal, you should up the price.
     
  42. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Maybe give it a try :) I think there is a 30 days free trial, and it's pretty easy to get it extended if you email them.

    I'll take note of the feature request :) If I were to add something similar, it would be a new master node that allow for geometry shader (with the grass being an example of it).
    For every feature I want to add, I am weighting how long the development will take, how likely it is that Unity will add something similar and how hard it'll be to update it to new major versions.

    Thanks for your kind words! I am bumping the price up every now and then, when I add new features and/or when the plugin stability improves :)
     
    _geo__ likes this.
  43. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,347
    Hi, I dug a little into geometry shaders. I found that they are poorly supported on mobile (also didn't work on my mobile test devices). Compute shaders seem to be all the rage nowadays. Haven't yet quite wrapped my mind around that though.

    While I was digging I stumbled upon the fact that Shader Graph has no Node for accessing the LOD value. It's easily fixed (see https://forum.unity.com/threads/acc...fade-in-shadergraph-workaround-inside.954561/). Might be a nice addition to SGE ;-)
     
    Last edited: Aug 19, 2020
  44. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
  45. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,347
    Hi, I have been upgrading from Unity 2020 to 2021.2.17f1 recently (URP 112.1.6, Shader Graph 12.1.6, SGE 1.1.13) and I get the following errors:

    Issue #1
    Code (CSharp):
    1. Assets\Plugins\ShaderGraphEssentials\Plugin\Editor\Plugin_URP\URPAssemblySpecific\Targets\SGEUniversalTarget.cs(621,39): error CS0539: 'SGEUniversalTarget.GetMetadataObject()' in explicit interface declaration is not found among members of the interface that can be implemented
    SGE-URPTarget.png

    Issue #2:
    Code (CSharp):
    1.  
    2. Assets\Plugins\ShaderGraphEssentials\Plugin\Editor\Plugin_URP\URPAssemblySpecific\Targets\SGEUniversalSubTarget.cs(31,75): error CS0535: 'SGEUniversalSubTarget' does not implement interface member 'IHasMetadata.GetMetadataObject(GraphDataReadOnly)'
    If I look into the Interface then I can see the getMedadataObject requires a GraphDataReadOnly parameter.
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. namespace UnityEditor.ShaderGraph
    4. {
    5.     [GenerationAPI]
    6.     interface IHasMetadata
    7.     {
    8.         string identifier { get; }
    9.         ScriptableObject GetMetadataObject(GraphDataReadOnly graph);
    10.     }
    11. }
    12.  
    If you can, please advise on how to resolve this. To me it seem like the parameter is just missing. Adding it resolves the first issue.
    Thank you.
     
    Last edited: Mar 29, 2022
  46. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,347
    Update:
    I have noe "resolved" the issues by adding the missing paramter to the interface implementations in SGEUniversalTarget.cs
    Code (CSharp):
    1.         ScriptableObject IHasMetadata.GetMetadataObject(GraphDataReadOnly graph)
    2.         {
    3.             // defer to subtarget
    4.             if (m_ActiveSubTarget.value is IHasMetadata subTargetHasMetaData)
    5.                 return subTargetHasMetaData.GetMetadataObject(graph);
    6.             return null;
    7.         }
    SGEUniversalSubTarget.cs
    Code (CSharp):
    1.         public virtual ScriptableObject GetMetadataObject(GraphDataReadOnly graph)
    2.         {
    3.             var urpMetadata = ScriptableObject.CreateInstance<UniversalMetadata>();
    4.             urpMetadata.shaderID = ShaderID.Unknown;//shaderID; // TODO: verify where this is used
    5.             urpMetadata.castShadows = target.castShadows;
    6.             return urpMetadata;
    7.         }
    Have not tested it yet, but it seems to me that these methods are already called with the right parameter and it's just the implementation that was missing. Though this competely ignored the GraphDataReadOnly graph parameter. Not sure if it's needed.
     
    Last edited: Mar 29, 2022
  47. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Hi there,
    Indeed, one of the last Unity update (2021.2.16f1) introduced breaking changes.
    I will work on an update to properly fix it.
    In the meantime, please revert back to use 2021.2.15f1 (can be downloaded here https://unity3d.com/get-unity/download/archive), I just double checked and it works on this version.
     
    _geo__ likes this.
  48. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,347
    Hi, not sure if it's related to the problem I had recently but on some platforms (Windows Standalone) the ShaderGraph shaders lighting looks wrong (SGE Simple Lit, ShaderGraph, Linear Color Space). The light calculation seems off. If I turn off all lights (direction light in my case) it looks okay. Mabye it's some specular highlight going wild?

    It seems to corrects itself if the scene is unloaded, then some other scenes are loaded, and then it's reloaded. So I guess some sort of initialization issue? If I use "Universal" instead of "SGE Universal" in the Graph Settings then it works.

    In the image you can see the difference between using "Universal" (for the grass patches) and "SGE Universal" for everything else. It also works fine on mobile (GLES 3).

    WeirdShading.png

    I am on Unity 2021.2.17f1, ShaderGraph 12.1.6, URP 12.1.6, Linear color, Graphics Jobs on, D3D.
    Hope this helps.

    Update: forget about it.
    I just noticed the same problem occurs with the default "Universal/Simple Lit" shader too. Therefore it's probably not directly SGE related.

    Update2: Found the culprit!
    In case someone else stumbles across this. Here is what the problem was.

    While upgrading from 2020 to 2021 it seems I missed that in a URP Render Asset the "Additional Lights" Settings was enabled for an Asset which had the "Main Light" disabled. In 2020 LTS the additional light setting got "ignored" if the main light was disabled. 2021 Unity seems to try to adhere to the additional light settings while keeping the main light disabled. I'd imagine this state is undefined as it's very unlogical to have your main light disabled but additional lights enabled. Setting the "Additional Lights" also to disabled resolved the issue. This only happens if "Simple Lit" is used, which makes it even harder to notice.

    RenderAssetLights.png

    Took me a while to figure that out. I hope this helps others some day.
    Sorry SGE for pointing fingers at you. T'was not your fault at all :oops:
     
    Last edited: Apr 4, 2022
    ph_ likes this.