Canonical way to get normal during surface assembly
szellmann opened this issue · comments
Provide a canonical way to obtain a surface (or vertex) normal when assembling surfaces. This would enable real user-defined geometry.
Partially addressed by commit 21cc07a. Some primitives have precalculated normals, some don't. get_surface()
should probably be adapted so that the following versions of the get_normal()
customization point are valid:
get_normal(hit_rec, prim);
get_normal(normlas, hit_rec, Primitive{});
get_normal(normals, hit_rec, Primitive{}, NormalBinding{});
Similar considerations apply to get_tex_coord()
.
Solved via cebec90
Interface is now:
get_normal(hit_rec, prim);
get_normal(normals, hit_rec, Primitive{}, NormalBinding{});
i.e. with precalculated normals around, specifying the normal binding is mandatory.