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.21 by greg, Mon Aug 14 23:45:41 2023 UTC vs.
Revision 2.26 by greg, Fri Apr 5 17:55:25 2024 UTC

# Line 20 | Line 20 | char   RFeatureList[2048] =    /* newline-separated feature
20                  "SourceVisibility\nAmbientModifierSelection\n"
21                  "PathTracing\nRussianRoulette\nLowDiscrepancySeq\n"
22                  "SpecularSampling\nMaterialMixtures\nAntimatter\nBackFaceVisibility\n"
23 <                "ParticipatingMedia=Mist\nScatteringModels=WGMD,Ashikhmin-Shirley\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 72 | Line 75 | match_subfeatures(     /* check if subfeatures are support
75                  while (*reqs && (*cp = *reqs++) != ',')
76                          cp++;
77                  *cp = '\0';
78 <                n = cp - subfeat;
79 <                if (!(cp = strstr(mysublist, subfeat)) ||
80 <                                (cp[-1] != ',') & (cp[-1] != '=') ||
81 <                                (cp[n] != ',') & (cp[n] != '\n'))
78 >                if (!(n = cp - subfeat))
79 >                        continue;       /* empty subfeature */
80 >                for (cp = mysublist; (cp = strstr(cp, subfeat)) != NULL; cp++)
81 >                        if ((cp[-1] == ',') | (cp[-1] == '=') &&
82 >                                        (cp[n] == ',') | (cp[n] == '\n'))
83 >                                break;  /* match */
84 >                if (!cp)
85                          return(0);      /* missing this one! */
86          }
87          return(1);                      /* matched them all */
# Line 307 | Line 313 | getrenderopt(          /* get next render option */
313                          return(1);
314                  }
315                  break;
316 + #if MAXCSAMP>3
317 +        case 'c':                               /* spectral sampling */
318 +                switch (av[0][2]) {
319 +                case 's':                       /* spectral bin count */
320 +                        check(3,"i");
321 +                        NCSAMP = atoi(av[1]);
322 +                        return(1);
323 +                case 'w':                       /* wavelength extrema */
324 +                        check(3,"ff");
325 +                        WLPART[0] = atof(av[1]);
326 +                        WLPART[3] = atof(av[2]);
327 +                        return(2);
328 +                }
329 +                break;
330 + #endif
331          }
332          
333          /* PMAP: Parse photon mapping options */
# Line 354 | Line 375 | print_rdefaults(void)          /* print default render values
375                          colval(salbedo,GRN), colval(salbedo,BLU));
376          printf("-mg %f\t\t\t# mist scattering eccentricity\n", seccg);
377          printf("-ms %f\t\t\t# mist sampling distance\n", ssampdist);
378 +        if (NCSAMP > 3) {
379 +                printf("-cs %-2d\t\t\t\t# number of spectral bins\n", NCSAMP);
380 +                printf("-cw %3.0f %3.0f\t\t\t# wavelength limits (nm)\n",
381 +                                WLPART[3], WLPART[0]);
382 +        }
383          printf("-lr %-9d\t\t\t# limit reflection%s\n", maxdepth,
384                          maxdepth<=0 ? " (Russian roulette)" : "");
385          printf("-lw %.2e\t\t\t# limit weight\n", minweight);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines