Fix line flickering in ancestral spade solver

This commit is contained in:
Linnea Gräf
2024-11-02 12:55:51 +01:00
parent 8b410fbdf2
commit c516c4b947
3 changed files with 89 additions and 90 deletions

View File

@@ -172,7 +172,7 @@ class RenderInWorldContext private constructor(
points.zipWithNext().forEach { (a, b) ->
val normal = Vector3f(b.x.toFloat(), b.y.toFloat(), b.z.toFloat())
.sub(a.x.toFloat(), a.y.toFloat(), a.z.toFloat())
// .normalize()
.normalize()
val lastNormal0 = lastNormal ?: normal
lastNormal = normal
buffer.vertex(matrix.positionMatrix, a.x.toFloat(), a.y.toFloat(), a.z.toFloat())