| 3 |  | # Render and primitive type testing | 
| 4 |  | # | 
| 5 |  |  | 
| 6 | + | # Number of processes to use on tests that test multi-core | 
| 7 | + | NPROC = 2 | 
| 8 | + |  | 
| 9 |  | # Image reduction for comparisons | 
| 10 |  | RDU_PFILT = pfilt -1 -r 1 -x 128 -y 128 -pa 1 | 
| 11 |  |  | 
| 12 |  | # Image comparison command | 
| 13 | < | IMG_CMP = radcompare -rms 0.08 -max 1.5 | 
| 13 | > | IMG_CMP = radcompare -rms 0.07 -max 1.5 | 
| 14 |  |  | 
| 15 |  | # Default target is to test everything | 
| 16 | < | all:    test-xform test-trans2-def test-trans2-fish test-dielectric-def \ | 
| 16 | > | all:    test-xform test-rfluxmtx \ | 
| 17 | > | test-mixtex-def test-mixtex-fish test-mixtex-plan test-mixtex-rplan \ | 
| 18 | > | test-trans2-def test-trans2-fish test-dielectric-def \ | 
| 19 |  | test-dielectric-fish test-glass-def test-glass-fish test-glass-up \ | 
| 20 |  | test-tfunc-def test-tfunc-fish test-inst-def test-inst-fish \ | 
| 21 |  | test-mesh-def test-mesh-cyl test-mirror-fish test-mist-def \ | 
| 22 | < | test-trans-def test-trans-fish | 
| 22 | > | test-trans-def test-trans-fish test-patterns-def test-patterns-plan \ | 
| 23 | > | test-rtrace | 
| 24 |  |  | 
| 25 |  | clean: | 
| 26 | < | rm -f *.oct *.amb *_ill.dat *_*.hdr *.unf combined.rad | 
| 26 | > | rm -f *.oct *.amb *_ill.dat blinds_ill?.dat *_*.hdr *.unf \ | 
| 27 | > | *.[cg]pm{,.leaf} combined.rad rfmirror.mtx | 
| 28 |  |  | 
| 29 | < | # Special test of xform | 
| 29 | > | ### Special test of xform ### | 
| 30 |  |  | 
| 31 |  | test-xform:     combined_scene.rad | 
| 32 |  | xform -f combined_scene.rad | grep -v '^[       ]*#' > combined.rad | 
| 33 | < | radcompare ref/combined.rad combined.rad | 
| 33 | > | radcompare -max 0.04 ref/combined.rad combined.rad | 
| 34 |  |  | 
| 35 | + | ### Special test of rtrace ### | 
| 36 | + |  | 
| 37 | + | test-rtrace:    ref/mirror_fish.hdr  rtmirror_fish.hdr | 
| 38 | + | $(RDU_PFILT) rtmirror_fish.hdr | $(IMG_CMP) -h ref/mirror_fish.hdr - | 
| 39 | + |  | 
| 40 | + | rtmirror_fish.hdr:      mirror.oct | 
| 41 | + | rad -v 0 mirror.rif OPT=mirror.opt | 
| 42 | + | vwrays -ff -vf fish.vf -x 2048 -y 2048 | rtrace -n $(NPROC) @mirror.opt \ | 
| 43 | + | -ffc -x 2048 -y 2048 mirror.oct | pfilt -1 -e +3 -r .6 -x /2 -y /2 \ | 
| 44 | + | > rtmirror_fish.hdr | 
| 45 | + | rm -f mirror.opt | 
| 46 | + |  | 
| 47 | + | ### Special test for rfluxmtx (and rcontrib) ### | 
| 48 | + |  | 
| 49 | + | test-rfluxmtx:  ref/rfmirror.mtx rfmirror.mtx | 
| 50 | + | radcompare -max .4 -rms .05 ref/rfmirror.mtx rfmirror.mtx | 
| 51 | + |  | 
| 52 | + | rfmirror.mtx:   mirror.rad dummysky.rad basic.mat diorama_walls.rad \ | 
| 53 | + | closed_end.rad front_cap.rad glass_pane.rad antimatter_portal.rad | 
| 54 | + | rfluxmtx -n $(NPROC) -ab 2 -lw 1e-4 mirror.rad dummysky.rad \ | 
| 55 | + | basic.mat diorama_walls.rad closed_end.rad front_cap.rad \ | 
| 56 | + | glass_pane.rad antimatter_portal.rad > rfmirror.mtx | 
| 57 | + |  | 
| 58 |  | ### Octree for dielectric ### | 
| 59 |  |  | 
| 60 |  | dielectric.oct: dielectric.rif | 
| 403 |  | rad -v   win  trans2.rif | 
| 404 |  |  | 
| 405 |  | ### End  trans2-win   tests | 
| 406 | + |  | 
| 407 | + | ### Octree for patterns ### | 
| 408 | + |  | 
| 409 | + | patterns.oct:   patterns.rif | 
| 410 | + | rad -v 0 patterns.rif | 
| 411 | + |  | 
| 412 | + | ### Reference and test for patterns view   def ### | 
| 413 | + |  | 
| 414 | + | test-patterns-def:      ref/patterns_def.hdr patterns_def.hdr | 
| 415 | + | $(RDU_PFILT) patterns_def.hdr | $(IMG_CMP) ref/patterns_def.hdr - | 
| 416 | + |  | 
| 417 | + | ref/patterns_def.hdr: | 
| 418 | + | make patterns_def.hdr | 
| 419 | + | $(RDU_PFILT) patterns_def.hdr > ref/patterns_def.hdr | 
| 420 | + |  | 
| 421 | + | patterns_def.hdr:       patterns.oct | 
| 422 | + | rad -v   def patterns.rif | 
| 423 | + |  | 
| 424 | + | ### End patterns-def   tests | 
| 425 | + |  | 
| 426 | + | ### Reference and test for patterns view   plan ### | 
| 427 | + |  | 
| 428 | + | test-patterns-plan:     ref/patterns_plan.hdr patterns_plan.hdr | 
| 429 | + | $(RDU_PFILT) patterns_plan.hdr | $(IMG_CMP) ref/patterns_plan.hdr - | 
| 430 | + |  | 
| 431 | + | ref/patterns_plan.hdr: | 
| 432 | + | make patterns_plan.hdr | 
| 433 | + | $(RDU_PFILT) patterns_plan.hdr > ref/patterns_plan.hdr | 
| 434 | + |  | 
| 435 | + | patterns_plan.hdr:      patterns.oct | 
| 436 | + | rad -v   plan patterns.rif | 
| 437 | + |  | 
| 438 | + | ### End patterns-plan   tests | 
| 439 | + |  | 
| 440 | + | ### Octree for  mixtex ### | 
| 441 | + |  | 
| 442 | + | mixtex.oct:     mixtex.rif | 
| 443 | + | rad -v 0  mixtex.rif | 
| 444 | + |  | 
| 445 | + | ### Reference and test for  mixtex view   def ### | 
| 446 | + |  | 
| 447 | + | test-mixtex-def:        ref/mixtex_def.hdr  mixtex_def.hdr | 
| 448 | + | $(RDU_PFILT)  mixtex_def.hdr | $(IMG_CMP) ref/mixtex_def.hdr - | 
| 449 | + |  | 
| 450 | + | ref/mixtex_def.hdr: | 
| 451 | + | make  mixtex_def.hdr | 
| 452 | + | $(RDU_PFILT)  mixtex_def.hdr > ref/mixtex_def.hdr | 
| 453 | + |  | 
| 454 | + | mixtex_def.hdr: mixtex.oct | 
| 455 | + | rad -v   def  mixtex.rif | 
| 456 | + |  | 
| 457 | + | ### End  mixtex-def   tests | 
| 458 | + |  | 
| 459 | + | ### Reference and test for  mixtex view  fish ### | 
| 460 | + |  | 
| 461 | + | test-mixtex-fish:       ref/mixtex_fish.hdr  mixtex_fish.hdr | 
| 462 | + | $(RDU_PFILT)  mixtex_fish.hdr | $(IMG_CMP) ref/mixtex_fish.hdr - | 
| 463 | + |  | 
| 464 | + | ref/mixtex_fish.hdr: | 
| 465 | + | make  mixtex_fish.hdr | 
| 466 | + | $(RDU_PFILT)  mixtex_fish.hdr > ref/mixtex_fish.hdr | 
| 467 | + |  | 
| 468 | + | mixtex_fish.hdr:        mixtex.oct | 
| 469 | + | rad -v  fish  mixtex.rif | 
| 470 | + |  | 
| 471 | + | ### End  mixtex-fish  tests | 
| 472 | + |  | 
| 473 | + | ### Reference and test for  mixtex view  plan ### | 
| 474 | + |  | 
| 475 | + | test-mixtex-plan:       ref/mixtex_plan.hdr  mixtex_plan.hdr | 
| 476 | + | $(RDU_PFILT)  mixtex_plan.hdr | $(IMG_CMP) ref/mixtex_plan.hdr - | 
| 477 | + |  | 
| 478 | + | ref/mixtex_plan.hdr: | 
| 479 | + | make  mixtex_plan.hdr | 
| 480 | + | $(RDU_PFILT)  mixtex_plan.hdr > ref/mixtex_plan.hdr | 
| 481 | + |  | 
| 482 | + | mixtex_plan.hdr:        mixtex.oct | 
| 483 | + | rad -v  plan  mixtex.rif | 
| 484 | + |  | 
| 485 | + | ### End  mixtex-plan  tests | 
| 486 | + |  | 
| 487 | + | ### Reference and test for  mixtex view rplan ### | 
| 488 | + |  | 
| 489 | + | test-mixtex-rplan:      ref/mixtex_rplan.hdr  mixtex_rplan.hdr | 
| 490 | + | $(RDU_PFILT)  mixtex_rplan.hdr | $(IMG_CMP) ref/mixtex_rplan.hdr - | 
| 491 | + |  | 
| 492 | + | ref/mixtex_rplan.hdr: | 
| 493 | + | make  mixtex_rplan.hdr | 
| 494 | + | $(RDU_PFILT)  mixtex_rplan.hdr > ref/mixtex_rplan.hdr | 
| 495 | + |  | 
| 496 | + | mixtex_rplan.hdr:       mixtex.oct | 
| 497 | + | rad -v rplan  mixtex.rif | 
| 498 | + |  | 
| 499 | + | ### End  mixtex-rplan tests |