Fix line flickering in ancestral spade solver
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
package moe.nea.firmament.features.diana
|
||||
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -37,7 +37,7 @@ void main() {
|
||||
gl_Position = vec4(-2.0, -2.0, -2.0, 1.0);
|
||||
return; // I don't care for these people
|
||||
}
|
||||
if (linePosStartBehind || linePosEndBehind) {
|
||||
if ((linePosStartBehind || linePosEndBehind) && false) {
|
||||
ndc1.z = 0.0;
|
||||
ndc2.z = 0.0;
|
||||
linePosStart.w = 1.0;
|
||||
|
||||
Reference in New Issue
Block a user