ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/renderopts.c
(Generate patch)

Comparing ray/src/rt/renderopts.c (file contents):
Revision 2.19 by greg, Wed Oct 19 21:25:20 2022 UTC vs.
Revision 2.25 by greg, Fri Apr 5 17:52:20 2024 UTC

# Line 16 | Line 16 | static const char      RCSid[] = "$Id$";
16   extern char     *progname;      /* global argv[0] */
17  
18   char    RFeatureList[2048] =    /* newline-separated feature list */
19 <                "AdaptiveShadowTesting\nVirtualSources\nSecondarySources\n"
20 <                "SourceSubsampling\nSourceVisibility\nAmbientModifierSelection\n"
21 <                "PathTracing\nBackFaceVisibility\nRussianRoulette\nLowDiscrepancySeq\n"
22 <                "SpecularSampling\nMaterialMixtures\nAntimatter\n"
23 <                "ParticipatingMedia=Mist\nScatteringModels=WGMD,Ashikhmin-Shirley\n"
19 >                "VirtualSources\nSecondarySources\nSourceSubsampling\n"
20 >                "SourceVisibility\nAmbientModifierSelection\n"
21 >                "PathTracing\nRussianRoulette\nLowDiscrepancySeq\n"
22 >                "SpecularSampling\nMaterialMixtures\nAntimatter\nBackFaceVisibility\n"
23 >                "ScatteringModels=WGMD,Ashikhmin-Shirley\n"
24                  "TabulatedBSDFs=DataFile,KlemsXML,TensorTreeXML,+ViewPeakExtraction\n"
25                  "Instancing=Octree,TriangleMesh\nAliases\n"
26 + #if MAXCSAMP>3
27 +                "Hyperspectral\n"
28 + #endif
29   #if !defined(SHADCACHE) || SHADCACHE > 0
30                  "ShadowCache\n"
31   #endif
# Line 73 | Line 76 | match_subfeatures(     /* check if subfeatures are support
76                          cp++;
77                  *cp = '\0';
78                  n = cp - subfeat;
79 <                if (!(cp = strstr(mysublist, subfeat)) ||
80 <                                (cp[n] != ',') & (cp[n] != '\n'))
79 >                for (cp = mysublist; (cp = strstr(cp, subfeat)) != NULL; cp++)
80 >                        if ((cp[-1] == ',') | (cp[-1] == '=') &&
81 >                                        (cp[n] == ',') | (cp[n] == '\n'))
82 >                                break;  /* match */
83 >                if (!cp)
84                          return(0);      /* missing this one! */
85          }
86          return(1);                      /* matched them all */
# Line 306 | Line 312 | getrenderopt(          /* get next render option */
312                          return(1);
313                  }
314                  break;
315 + #if MAXCSAMP>3
316 +        case 'c':                               /* spectral sampling */
317 +                switch (av[0][2]) {
318 +                case 's':                       /* spectral bin count */
319 +                        check(3,"i");
320 +                        NCSAMP = atoi(av[1]);
321 +                        return(1);
322 +                case 'w':                       /* wavelength extrema */
323 +                        check(3,"ff");
324 +                        WLPART[0] = atof(av[1]);
325 +                        WLPART[3] = atof(av[2]);
326 +                        return(2);
327 +                }
328 +                break;
329 + #endif
330          }
331          
332          /* PMAP: Parse photon mapping options */
# Line 353 | Line 374 | print_rdefaults(void)          /* print default render values
374                          colval(salbedo,GRN), colval(salbedo,BLU));
375          printf("-mg %f\t\t\t# mist scattering eccentricity\n", seccg);
376          printf("-ms %f\t\t\t# mist sampling distance\n", ssampdist);
377 +        if (NCSAMP > 3) {
378 +                printf("-cs %-2d\t\t\t\t# number of spectral bins\n", NCSAMP);
379 +                printf("-cw %3.0f %3.0f\t\t\t# wavelength limits (nm)\n",
380 +                                WLPART[3], WLPART[0]);
381 +        }
382          printf("-lr %-9d\t\t\t# limit reflection%s\n", maxdepth,
383                          maxdepth<=0 ? " (Russian roulette)" : "");
384          printf("-lw %.2e\t\t\t# limit weight\n", minweight);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines