Lines Matching refs:incident

69 color shader(ray* incident) {  in shader()  argument
78 numints = closest_intersection(&t, &obj, incident->intstruct); in shader()
85 return incident->scene->background; in shader()
92 RAYPNT(hit, (*incident), t) /* find the point of intersection from t */ in shader()
93 obj->methods->normal(obj, &hit, incident, &N); /* find the surface normal */ in shader()
96 col = obj->tex->texfunc(&hit, obj->tex, incident); in shader()
120 shadowray.intstruct = incident->intstruct; in shader()
122 incident->serial++; in shader()
123 shadowray.serial = incident->serial; in shader()
124 shadowray.mbox = incident->mbox; in shader()
130 shadowray.scene = incident->scene; in shader()
131 reset_intersection(incident->intstruct); in shader()
134 if (!shadow_intersection(incident->intstruct, Llen)) { in shader()
141 phongval = shade_phong(incident, &hit, &N, &L, obj->tex->phongexp); in shader()
166 specol = shade_reflection(incident, &hit, &N, obj->tex->specular); in shader()
174 transcol = shade_transmission(incident, &hit, 1.0 - obj->tex->opacity); in shader()
181 color shade_reflection(ray* incident, vector* hit, vector* N, flt specular) { in shade_reflection() argument
186 VAddS(-2.0 * (incident->d.x * N->x + incident->d.y * N->y + incident->d.z * N->z), in shade_reflection()
188 &incident->d, in shade_reflection()
191 specray.intstruct = incident->intstruct; /* what thread are we */ in shade_reflection()
192 specray.depth = incident->depth - 1; /* go up a level in recursion depth */ in shade_reflection()
194 specray.serial = incident->serial + 1; /* next serial number */ in shade_reflection()
195 specray.mbox = incident->mbox; in shade_reflection()
200 specray.scene = incident->scene; /* global scenedef info */ in shade_reflection()
203 incident->serial = specray.serial; /* update the serial number */ in shade_reflection()
210 color shade_transmission(ray* incident, vector* hit, flt trans) { in shade_transmission() argument
214 transray.intstruct = incident->intstruct; /* what thread are we */ in shade_transmission()
215 transray.depth = incident->depth - 1; /* go up a level in recursion depth */ in shade_transmission()
217 transray.serial = incident->serial + 1; /* update serial number */ in shade_transmission()
218 transray.mbox = incident->mbox; in shade_transmission()
220 transray.d = incident->d; /* ray continues along incident path */ in shade_transmission()
223 transray.scene = incident->scene; /* global scenedef info */ in shade_transmission()
226 incident->serial = transray.serial; in shade_transmission()
233 flt shade_phong(ray* incident, vector* hit, vector* N, vector* L, flt specpower) { in shade_phong() argument
237 V = incident->d; in shade_phong()