[Bf-cycles] Question about Oren-Nayar diffuse model

Yasuhiro Fujii y-fujii at mimosa-pudica.net
Mon Oct 17 09:49:39 CEST 2011

Sorry. The original code is wrong.

 nl = max(dot(N, L), 0.0f);
 nv = max(dot(N, E), 0.0f);
 arg_nl = acos(nl);
 arg_nv = acos(nv);
 a = max(arg_nl, arg_nv);
 b = min(arg_nl, arg_nv);
 b *= 0.95f;
 sin_a = sin(a);
 tan_b = tan(b);

-- y.fujii

More information about the Bf-cycles mailing list