38 |
|
* Arguments for MAT_TFUNC are: |
39 |
|
* 2+ func funcfile transform |
40 |
|
* 0 |
41 |
< |
* 4+ red grn blu rspec trans tspec A7 .. |
41 |
> |
* 6+ red grn blu rspec trans tspec A7 .. |
42 |
|
* |
43 |
|
* Arguments for MAT_TDATA are: |
44 |
|
* 4+ func datafile funcfile v0 .. transform |
45 |
|
* 0 |
46 |
< |
* 4+ red grn blu rspec trans tspec A7 .. |
46 |
> |
* 6+ red grn blu rspec trans tspec A7 .. |
47 |
|
* |
48 |
|
* Arguments for the more general MAT_BRTDF are: |
49 |
|
* 10+ rrefl grefl brefl |
140 |
|
lddx[3] = omega; |
141 |
|
/* compute BRTDF */ |
142 |
|
if (np->mp->otype == MAT_BRTDF) { |
143 |
< |
if (sa[6][0] == '0') /* special case */ |
143 |
> |
if (sa[6][0] == '0' && !sa[6][1]) /* special case */ |
144 |
|
colval(ctmp,RED) = 0.0; |
145 |
|
else |
146 |
|
colval(ctmp,RED) = funvalue(sa[6], 4, lddx); |
147 |
< |
if (sa[7][0] == '0') |
147 |
> |
if (sa[7][0] == '0' && !sa[7][1]) |
148 |
|
colval(ctmp,GRN) = 0.0; |
149 |
|
else if (!strcmp(sa[7],sa[6])) |
150 |
|
colval(ctmp,GRN) = colval(ctmp,RED); |
151 |
|
else |
152 |
|
colval(ctmp,GRN) = funvalue(sa[7], 4, lddx); |
153 |
< |
if (!strcmp(sa[8],sa[6])) |
153 |
> |
if (sa[8][0] == '0' && !sa[8][1]) |
154 |
> |
colval(ctmp,BLU) = 0.0; |
155 |
> |
else if (!strcmp(sa[8],sa[6])) |
156 |
|
colval(ctmp,BLU) = colval(ctmp,RED); |
157 |
|
else if (!strcmp(sa[8],sa[7])) |
158 |
|
colval(ctmp,BLU) = colval(ctmp,GRN); |
208 |
|
BRDFDAT nd; |
209 |
|
RAY sr; |
210 |
|
double mirtest=0, mirdist=0; |
211 |
< |
double transtest, transdist; |
211 |
> |
double transtest=0, transdist=0; |
212 |
|
int hasrefl, hastrans; |
213 |
|
int hastexture; |
214 |
|
COLOR ctmp; |
365 |
|
objerror(m, USER, "bad # arguments"); |
366 |
|
/* check for back side */ |
367 |
|
if (r->rod < 0.0) { |
368 |
< |
if (!backvis && m->otype != MAT_TFUNC |
367 |
< |
&& m->otype != MAT_TDATA) { |
368 |
> |
if (!backvis) { |
369 |
|
raytrans(r); |
370 |
|
return(1); |
371 |
|
} |