Make smoothstep consistent

This commit is contained in:
mcDandy
2025-12-19 23:05:06 +01:00
parent 967188b681
commit 0876875c59
+3 -3
View File
@@ -170,9 +170,9 @@ class FloatEvalVisitor(MathExprVisitor):
return a + (b - a) * w
def visitSmoothstepFunc(self, ctx):
edge0 = self.visit(ctx.expr(0))
edge1 = self.visit(ctx.expr(1))
x = self.visit(ctx.expr(2))
x = self.visit(ctx.expr(0))
edge0 = self.visit(ctx.expr(1))
edge1 = self.visit(ctx.expr(2))
# Scale, bias and saturate x to 0..1 range
t = (x - edge0) / (edge1 - edge0)