Basic TOON SHADER In UNITY Using Shader Graph - Unity Lazy Tutorial

preview_player
Показать описание
Hi, I'm stealing the "Lazy Tutorial" naming from the great Ian Hubert. This is not a proper tutorial, more of a rundown of how I achieved this effect.
#indiegame #gamedev #unity

Custom Function node HLSL code:

#if SHADERGRAPH_PREVIEW
Direction = half3(0.5, 0.5, 0);
Color = 1;
#else
Light light = GetMainLight();
game endif

if you get an error, try this (thanks to John Pitaniello in the comments):

#if defined(SHADERGRAPH_PREVIEW)
Direction = half3(0.5, 0.5, 0);
Color = 1;
#else
Light light = GetMainLight();
#endif

If you liked this video, you might also like these from other creators:

Video Timestamps:
0:00 Intro
0:22 The Idea
0:53 The Shader
2:17 Outro

Video Tags:
#indiegame #gamedev #unity #indiegames #gamedevelopment #programming #3dgame #3dmodeling #lowpoly #blender #photoshop #unrealengine #godot #devlog #indiedev
Рекомендации по теме
Комментарии
Автор

Just incase you get any errors in the custom function, be sure to put #if defined(SHADERGRAPH_PREVIEW) instead of
#if SHADERGRAPH_PREVIEW.

mazander_man
Автор

Such a necessary video material, but an absolutely incomprehensible lesson for beginners.

mfedorov
Автор

You keep showing every part in segments and not really showing how everything connects together. It's hard for me to follow personally

alexwilliams
Автор

Very helpful explanation! Can't wait to see the post processing on it!

mazander_man
Автор

love stuff at this level, fast and an overview of whats important to make a change to whats existing

sahilmishra
Автор

Nicely done my friend! Very concise and well executed tutorial for a look I've been wanting to achieve for a very long time :D

ShibaDogStudios
Автор

Hi I would love to just keep getting more content of this, this is something I've been looking for, for a minute keep up the great work

jaredrodriguez
Автор

Love your videos man! Continue with what you're doing.

LetsGoSalmon
Автор

I really needed to understand this. Thank you!!!

jorgearturoalvarezcenal
Автор

Adore you! This is exactly what I need! You are super cool as always! By the way, cool beard)

GogoDevv
Автор

For some reason I had to write:
#if SHADERGRAPH_PREVIEW
Direction = half3(0.5, 0.5, 0);
Color = 1;
#else
Light light = GetMainLight();
Direction = light.direction;
Color = light.color;
#endif

instead of:

#if SHADERGRAPH_PREVIEW
Direction = half3(0.5, 0.5, 0);
Color = 1;
#else
Light light = GetMainLight();
Direction = light.direction;
Color = light.color;
game endif

Which it said in description, why?

SuperBlueOrange_
Автор

Can someone help, i cant figure out where to put output of lerp, when i put it in base color just pink texture appears and material becomes just flat color

Fahrc
Автор

just wondering where the Lerp node is meant to connect to, its going off screen. any help would be appreciated.

Ratos-
Автор

can you show how the final shader looks?

AlqueMeteor
Автор

I noticed a problem, when an object is in shadow it doesnt get darker, do you know how to fix this, - also how did you do the black outline

danielhuwiler
Автор

Could you provide a screenshot that shows all the links so that I can better understand how to recreate a similar effect?

matteoburzi
Автор

I've found that when I sample the shading ramp the resulting sample is blurry. How do I make sure the colors stay distinct?

tinocaer
Автор

Thanks for this .👍 but I didn't get how to create this ?? what to use and how?? Ate these in urp sprite lite shader graph ??

neozoid
Автор

Hi, I’m a beginner of unity. Could you tell me What type of node is Fresnel Power and Fresnel Threshold?I couldn’t find appropriate node.

dwjdwuk
Автор

Excellent tutorial! Is the fresnel the part of the shader that adds the edge outlines though? If so, they're not appearing for me.

abject_ladder