Unity Shader Graph Introduction - Basic Shader Graph Tutorial

preview_player
Показать описание
An introduction to Unity's Shader Graph. This is the foundation for my shader tutorial playlist. I am using shader graph in the Universal Render Pipeline (or URP), but this demo will work in HDRP as well.

**** Update for Shader Graph 10.x
This video was made with Shader Graph 8.2
If you are using Shader Graph 10.x there are a couple key differences:

The create shader options have moved within a sub-menu called "Universal Render Pipeline, and some are renamed. So "Create--Shader--PBR graph" becomes "Create--Shader--Universal Render Pipeline--Lit Shader Graph"
The per-input settings that were in the blackboard are now in the "Graph Inspector" within the "Node Settings". You must have the input selected to see its settings in that window.
Some other settings that were on-node are now also in that Graph Inspector, though you can generally ignore these.
If you want to generate a code shader from the graph, you do so on the graph asset inspector (not on the master node as you did in 8.2). Now select the graph asset, and hit "View Generated Shader" button in its inspector.
****

I'll go a into how vertex shaders work in shader graph somewhat, but will focus on fragment shaders. My demo will take an image, make it black & white, color tint it blue, then make the yellow-ish parts stay their original yellow-ish. As a bonus at the end I show you how to flicker the yellow bits.

#ShaderGraph #Unity #Shader
Рекомендации по теме
Комментарии
Автор

Random but related quote of the week:
_Begin at the beginning, _
_and go on till you com to the end:_
_then stop_
- The King; Alice's Adventures in Wonderland.

GameDevBill
Автор

Best shader tutorial I've watch so far! thank you very much

michaeltodemann
Автор

Clear and concise, yet so so informative. Thanks for this and looking forward to future tutes!

nikefootbag
Автор

This was super descriptive! I like how much this reminds me of functions in Mathematics! It's composite functions to the max!

TheMathMaster
Автор

Great getting started guide. Keep the tutorials coming :)

alffanclub
Автор

Thanks for the tutorial! I learned a few useful points when working with a shader graph! How glad I am that I came across this channel =)

kripakovd
Автор

I'm stoked for these videos!! Keep em coming :)

chris.davidoff
Автор

I'm so glad that I came across this channel. Subscribed!

hasanshafy_
Автор

This is a very good introduction to shader graph. But not for a beginner for shaders at all.

indikaWijesooriya
Автор

- in the scene view, next to the buttons to toggle lighting and sound, there's a dropdown to "toggle skybox, fog, and various other effects". One of those toggle-able effects is "Animated Materials". Turn this on, and you can actually see these animating in the scene view. It may cost you some rendering power, so if your computer is struggling, turn this off, but for a quick in-scene view, it's a great tip.
Thanks arislaan on Reddit!
(for context, this is in reference to my comment at around 9:20 in the video.

GameDevBill
Автор

@GameDevBill you are one of the good ones. You should consider making a course on Udemy. If you do, I'm in.

raistlinmajere
Автор

PBR graph doesn't show up in my list of things to pick from?

MetricZero
Автор

Any idea why the sprits I import to shader graph for preview are just squares? It works fine if I play the game and test but my preview is always a square as if the alpha of the background is completely opaque. Even the same for sprits like the one you've shown but currently just using a standard circle sprite.

MattBeek
Автор

there's no master nodes like that anymore, things are setup elsewhere now in 2021

robbieatkinson
Автор

"Basic" and "Tutorial" are not applied here at all.
If you think you can simply show us the process without any explanation why this goes here and that goes there - you're wrong then

TheSunriseGames