Submissions from 2022-10-17 to 2022-10-18 (1 total)

now, instead of having textures interpolate according to a slider, the next few lessons explore interesting ways of using dot products with certain vectors, like normals, to get both albedo and/or emissions fading between values all over the surface of the object.

the first example was a snow effect, setting the second texture to a snowy floor and then using the normal of the surface of the object to make it so that texture appeared strongest wherever the surface points straight up, and it fades down slopes.

the next example was a rim lighting effect, using the direction the camera is pointing and inverted the dot product of that and the surface normal to boost emission values. because we inverted it, the parts of the surface that aren't turned towards the camera are the brightest, which are the edges.

the third example and the last i got to tonight is a toon shader, which actually has to step in and replace Unity's Standard lighting method since we want to change how light is handled. now we care about the surface normal and the direction of the light, again using dot products, and then we use a smoothstep function to make the edge of the lighting harder (but not too hard).

all very sensible applications of dot products, i've worked with it for physics-related reasons enough to understand most of it. i haven't followed along in unity nearly as well as i did at the start of the tutorial, but i'm still understanding the concepts. and i think it's most important that i just expose myself to the problems and solutions for shaders if nothing else, because that's still learning something important.