| 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 |  |  | 
| 13 |  | IMG_CMP = radcompare -rms 0.07 -max 1.5 | 
| 14 |  |  | 
| 15 |  | # Default target is to test everything | 
| 16 | < | all:    test-xform \ | 
| 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 test-patterns-def test-patterns-plan | 
| 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 blinds_ill?.dat *_*.hdr *.unf \ | 
| 27 | < | *.[cg]pm{,.leaf} combined.rad | 
| 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 -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 |  |  |