Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
vector dir = chv('dir');
float angle = dot(@N, dir);
float fitangle = fit(angle, -1, 1, 0, 1);
float blend = chramp('blend', fitangle);
@Cd = blend;
vector tmp = cross(@N, dir);
vector cross = cross(@N, tmp);
v@N = lerp(@N, cross, blend);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment