Commit 99097b6
committed
curves: simplify sweep intersector unstable tests and flatness check
In curve_intersector_sweep.h:
- Replace m < 0.2f*length(W) with the equivalent squared form
m*m < 0.04f*dot(W,W) to avoid a sqrt in the per-subdivision
well-behavedness check.
- Reuse the already cached local dir variable in unstable-angle tests
instead of reconstructing Vec3fa(ray.dir) repeatedly.
These are arithmetic-equivalent changes intended to lower instruction
pressure in the recursive sweep intersector path used by round curves.1 parent c03932b commit 99097b6
1 file changed
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
| 249 | + | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
352 | | - | |
| 351 | + | |
353 | 352 | | |
354 | 353 | | |
355 | 354 | | |
| |||
415 | 414 | | |
416 | 415 | | |
417 | 416 | | |
418 | | - | |
419 | | - | |
| 417 | + | |
| 418 | + | |
420 | 419 | | |
421 | 420 | | |
422 | 421 | | |
| |||
0 commit comments