Finally starting to implement illuminated materials šŸ˜Ž #TangerineCSG
Essentially what's going on here is the cosine angle between the surface normal and the inverse light ray is clamped to 0-1 range and then passes into the color gradient eval function. I figure this would be useful for weird cell shading, but I'm still deciding how I want this to work. For example, should the ramp be evaluated once per light and averaged, or just evaluated once per vertex with a combined parameter.
@aeva when you say it’s being clamped down you mean you’re cutting the [-1, 0) range to 0? It’d be good to expose the full [-1, 1] range for ā€œhalf lambertā€ stuff.
@porglezomp rgb = ramp(clamp(-dot(N, L), 0, 1))
@porglezomp I'm open minded to doing ramp(-dot(N, L) * .5 + .5) instead, but I wasn't sure if there'd be much of a case for it
@aeva @porglezomp this is what I’ve done every time I’ve done toon ramp stuff! gives real nice control of the shadow bits too