Tutorial about Toon Shading and the light() function in shaders

I made this tutorial where we go over the light() function and create a nice toon shader:

https://bun3d.com/tutorials/shading/godot-toon-shading/

I try to be as beginner friendly with this tutorial, so things are explained indepth with understandable language (I hope)

3 Likes

Oh by the way the code in this part has an extra parenthesis at the end so it should be:

float fresnel(vec3 normal, vec3 view)
{
	return 1.0 - clamp(dot(normalize(normal), normalize(view)), 0.0, 1.0);
}