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

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello there under my recent video on pixelated rendering somebody asked how did i achieve the shitty look on my objects so here is a rundown on how i do that and yeah if you like this video please give it a thumbs up consider subscribing to the channel and if you have any questions or just want to help me out by boosting the engagement leave a comment down below this said see you at the end of this one [Music] for our tune shader to work we're going to take the normal vector of each face on the object and calculate the dot product between that and the main lights direction that is gonna give us a value between negative one and one so we wanna find a way to map that to a zero to one interval now we're gonna take this value from zero to one and use it to shade our object and we're gonna do so by sampling a color ramp or shadow ramp that we're gonna paint in whatever software you want and that is gonna define our brightness banding for the material [Music] first for each pixel we wanna take the normal vector and calculate the dot product between that and the main light direction the main light is going to be a custom function node that has some custom hlsl code to return either mock data for the direction and the color of the main light in the shadow graph review window or the actual direction and color of the main light when rendered in the scene or the game view then we want to take the dot product result and remap it from an interval of negative one to one to zero to one so first we add one and then divide by two let's take the result of our multiply operation and plug it into a sample of texas 2d node that we will use to sample the shading ram then we can take whatever channel of this sample node and use it to interpolate between a dark color and the lid color and the base effect is actually achieved to spice things up a little bit let's try and add some rim lighting what you want to do is take a fresnel node and plug it into a step node we're going to use a step threshold to decide where to cut off our final effect then we want to take that and the result of the multiply node and plug them into a maximum node to take the maximum value and use that to sample the texture well you can really just skip the step node step and just plug the fresnel node into the maximum and you're going to achieve a result that is similar but a bit more subtle and that's it i hope you enjoyed this shorter form video than usual and yeah please check the description for more resources on the topic and this said yeah i've been peter you've been great see you next time
Info
Channel: whateep
Views: 41,114
Rating: undefined out of 5
Keywords: game development, indie games, videogames, unity, devlog, tutorial, toon shader, shaders, breath of the wild, unity3d, godot, gamedev
Id: rCvISlussGE
Channel Id: undefined
Length: 2min 32sec (152 seconds)
Published: Fri Aug 05 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.