Lines Matching refs:obj
74 object* obj; in shader() local
78 numints = closest_intersection(&t, &obj, incident->intstruct); in shader()
88 if (obj->tex->islight) { /* if the current object is a light, then we */ in shader()
89 return obj->tex->col; /* will only use the objects ambient color */ 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()
103 if ((obj->tex->diffuse > 0.0) || (obj->tex->phong > 0.0)) { in shader()
139 if (obj->tex->phong > 0.0) { in shader()
141 phongval = shade_phong(incident, &hit, &N, &L, obj->tex->phongexp); in shader()
142 if (obj->tex->phongtype) in shader()
152 ColorScale(&diffuse, obj->tex->diffuse); in shader()
154 col.r *= (diffuse.r + obj->tex->ambient); /* do a product of the */ in shader()
155 col.g *= (diffuse.g + obj->tex->ambient); /* diffuse intensity with */ in shader()
156 col.b *= (diffuse.b + obj->tex->ambient); /* object color + ambient */ in shader()
158 if (obj->tex->phong > 0.0) { in shader()
164 if (obj->tex->specular > 0.0) { in shader()
166 specol = shade_reflection(incident, &hit, &N, obj->tex->specular); in shader()
172 if (obj->tex->opacity < 1.0) { in shader()
174 transcol = shade_transmission(incident, &hit, 1.0 - obj->tex->opacity); in shader()