remove offset from slicing shader

This commit is contained in:
2020-01-28 13:00:15 -05:00
parent c6705b2047
commit c8955335e2
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ void main() {
float x = 0.7; float x = 0.7;
for (int i = 0; i < 4; ++i) { for (int i = 0; i < 4; ++i) {
if (pos4[i].w+x < 0) { if (pos4[i].w < 0) {
lo[L++] = i; lo[L++] = i;
} else { } else {
hi[H++] = i; hi[H++] = i;
@@ -53,7 +53,7 @@ void main() {
vec4 a = pos4[lo[l]]; vec4 a = pos4[lo[l]];
vec4 b = pos4[hi[h]]; vec4 b = pos4[hi[h]];
float t = unmix(a.w+x, b.w+x); float t = unmix(a.w, b.w);
sect[S++] = mix(a, b, t); sect[S++] = mix(a, b, t);
} }

View File

@@ -102,7 +102,7 @@ int main(int argc, char *argv[]) {
auto mirrors = mirror(group); auto mirrors = mirror(group);
auto corners = plane_intersections(mirrors); auto corners = plane_intersections(mirrors);
auto start = barycentric(corners, {1.00f, 0.1f, 0.01f, 0.05f}); auto start = barycentric(corners, {1.00f, 0.1f, 0.01f, 0.01f});
auto points = res.path.walk<glm::vec4, glm::vec4>(start, mirrors, reflect); auto points = res.path.walk<glm::vec4, glm::vec4>(start, mirrors, reflect);
auto g_gens = gg.group_gens(); auto g_gens = gg.group_gens();