Shader Graph in Unity 2021! (changes from 2020 | URP 10)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome i'm your code monkey and this is a pretty quick video just highlighting some changes with shadowgraph in unity 2020 and above over the last few years i've made a bunch of shaders using shadowgraph i've made some simple dissolve a really nice shield some wind effects and so on you can find the home playlist linked in the description and all those tutorials are still accurate and fully working in any unity version there's only just a few slight changes required to make it work on the latest unity version there's really only one main huge difference which i'm going to cover in the end if you prefer a more guided path with step-by-step lectures then check out my complete courses learn how to make a builder defender game using c-sharp just like i make my own steam games or learn how to make games internally using visual scripting or learn all about unity with the ultimate overview course which contains over 13 lectures each covering a different tool or feature of the engine to help you make better games faster i'm always available in the courses q a section answering your questions every single day so check out all the courses with the link in the description okay so here i have my project i'm using unity 2020.3 and i'm using shadowgraph version 10 and if i just go and create a brand new graph and over here i see the new shadow graph window now there are two main changes first of all the properties over here on the left side now previously when you made a property so let's say a float call it amount previously when you made this you would see all the parameters right under here however now as of unity 2010 there is a dedicated graph inspector window so this shows all of the information for the selected property so here you still see the exact same thing so you see the name you see the reference the default value and so on so all the things that previously were around here they're now separate on the graph inspector and this one shows extra information on any selected properties and it also shows some extra information on any nodes if i select the node now i see the node settings so this is one of the main changes some of the property parameters are in a separate window as opposed to all being on the same place the other big changes with regards to the master node now previously the masternode look like any other node but on this version it's slightly different first of all it's not an actual node so previously you could just right click and add any new master nodes and define one of them as active whereas now you just have this single master stack which you cannot delete and you cannot add any more of them so if i just go here and i type in master nope doesn't find anything but again all of that functionality still exists except now it's on the graph inspector so over here on the graph inspector you've got this one for the node settings and next to it the graph settings one of the things that you would do by creating a new master node would be simply just change the type so previously you would make a new master node and set that one as active whereas now you've got this nice drop down menu so if i wanted to change this node from being lit to being sprite lit or unlit or anything i just have to select from down here and automatically updates the master node so there you go just like that and all the other settings that showed up on the gear icon they also now show up over here on the graph inspector so over here on the surface you can change it from opaque to transparent you can add an alpha clip make it to the side and so on now one great new addition in this new version is the fact that you can now build shaders that work for both urp and hdrp previously they were commonly separate so you need to make two different graphs whereas now you can just click on the plus icon and if you have multiple render pipelines installed and over here you can simply add them so you can make just one shader just one shadow graph file and make it work in universal agrp or also make it work with the vfx ref so this is super useful for ensuring all of your graphs work on all pipelines and reducing any asset duplication i imagine this is going to be super useful as we go along for any asset that gets placed on the asset store so going forward chances are most assets will support all of the rendered pipelines now there's still one more huge difference and this one is with regards to making some 2d shaders now over here i've got the the solve effect that i made in a previous video and this one is actually the actual file that i created in that video so this file this graph was created in unity 2019 however it still loads perfectly right in here when using shadowgraph 10. so interestingly enough even though shadowgraph has changed you can still directly load all of the old shadow graphs however note the master stack here look how the fragment has a sprite color with four colors whereas over here on the new shadow graph you can see that it looks quite different and the main difference is like i saw previously the caller had four valleys so it had rgb and a whereas on this one now you only got three so you only got rgb and you've got the alpha separate so let's see what difference this makes so if i just go into my own dissolve and i just copy all these notes and i paste them all in here in doing so now in the other one i simply connect that one into the base color and if i do that everything does work i do have the the song working but as you can see i do not have the alpha working so as you're following some older tutorials and yes you're recreating them from scratch keep this in mind the outfit channel is separate so in this case it's super simple to solve i've actually got the alpha channel right in here these got all four values so i can simply add the split node and i input this one and the split you can select each individual channel so for example i can just grab the alpha channel connected and yep now this one is perfect so this is the one big breaking change previously if you fed the alpha input directly into the base color it would automatically apply it whereas now you need to have a separate alpha for the separate alpha input so that's the main thing that you need to be careful with when following some tutorials with other graph versions alright so those are the changes as you can see they are pre-minor so if you find an old tutorial that was made months or even years ago you can still follow it and just apply these small changes for example go check out all of the effects that i made in the playlist and you can easily convert them to work in the latest version again if you're looking for a more guided path with step-by-step lectures then check out my complete courses alright hope that's useful check out these videos to learn some more thanks to these awesome patreon supporters for making these videos possible thank you for watching and i'll see you next time [Music]
Info
Channel: Code Monkey
Views: 48,260
Rating: undefined out of 5
Keywords: shader graph 2021, shader graph changes, shader graph 2020, unity urp 10, code monkey, unity shader graph, unity shader tutorial, unity shader, unity shaders, unity shader graph post processing, how to make shaders in unity, unity make shader, unity tutorial, unity game tutorial, unity tutorial for beginners, unity 2d tutorial, unity 3d, unity, game design, game development, game dev, game development unity, unity 2d, unity 3d tutorial, unity tutorials, shader graph
Id: azGMuP9ks8U
Channel Id: undefined
Length: 6min 19sec (379 seconds)
Published: Mon Oct 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.