--wip-- [skip ci]

This commit is contained in:
2025-06-25 00:00:13 +01:00
parent 42d47f57c4
commit 4a60649429
+3 -3
View File
@@ -754,7 +754,7 @@ impl<'csg> IntervalInterpreter<'csg> {
SSASmoothMin => { SSASmoothMin => {
self.param_three(instruction, |d1, d2, k| { self.param_three(instruction, |d1, d2, k| {
let h = (Interval::HALF + (Interval::HALF * (d2 - d1) / k)) let h = (Interval::HALF + (Interval::HALF * (d2 - d1) / k))
.simd_clamp(Interval::ZERO, Interval::ONE); .clamp(Interval::ZERO, Interval::ONE);
return ((d2 * (Interval::ONE - h)) + (d1 * h)) return ((d2 * (Interval::ONE - h)) + (d1 * h))
- k * h * (Interval::ONE - h); - k * h * (Interval::ONE - h);
}); });
@@ -762,7 +762,7 @@ impl<'csg> IntervalInterpreter<'csg> {
SSASmoothMax => { SSASmoothMax => {
self.param_three(instruction, |d1, d2, k| { self.param_three(instruction, |d1, d2, k| {
let h = (Interval::HALF - (Interval::HALF * (d2 + d1) / k)) let h = (Interval::HALF - (Interval::HALF * (d2 + d1) / k))
.simd_clamp(Interval::ZERO, Interval::ONE); .clamp(Interval::ZERO, Interval::ONE);
return ((d2 * (Interval::ONE - h)) + (-d1 * h)) return ((d2 * (Interval::ONE - h)) + (-d1 * h))
+ k * h * (Interval::ONE - h); + k * h * (Interval::ONE - h);
}); });
@@ -771,7 +771,7 @@ impl<'csg> IntervalInterpreter<'csg> {
SSASmoothMaxMaterial => todo!(), SSASmoothMaxMaterial => todo!(),
SSAClamp => { SSAClamp => {
self.param_three(instruction, |val_a, val_b, val_c| { self.param_three(instruction, |val_a, val_b, val_c| {
val_a.simd_clamp(val_b, val_c) val_a.clamp(val_b, val_c)
}); });
}, },
SSAMix => { SSAMix => {