drawable to "slice" and add builder factory method

This commit is contained in:
2020-03-14 00:36:46 -04:00
parent 0300e1bfc3
commit f06f92bd9b
3 changed files with 66 additions and 88 deletions

View File

@@ -64,14 +64,6 @@ void main() {
normal = cross(sect[1].xyz - sect[0].xyz, sect[2].xyz - sect[0].xyz);
normal = normalize(normal);
float r = dot(normal, sect[0].xyz);
if (abs(r) < 0.001)
r = dot(normal, sect[0].xyz + vec3(0, 0, 1));
if (r < 0)
normal *= -1;
for (int s = 0; s < S; ++s) {
emit(sect[s]);
}