Lines Matching refs:tex

60 color standard_texture(vector *hit, texture *tex, ray *ry) {  in standard_texture()  argument
61 return tex->col; in standard_texture()
65 color image_cyl_texture(vector *hit, texture *tex, ray *ry) { in image_cyl_texture() argument
69 rh.x = hit->x - tex->ctr.x; in image_cyl_texture()
70 rh.z = hit->y - tex->ctr.y; in image_cyl_texture()
71 rh.y = hit->z - tex->ctr.z; in image_cyl_texture()
75 u = u * tex->scale.x; in image_cyl_texture()
76 u = u + tex->rot.x; in image_cyl_texture()
81 v = v * tex->scale.y; in image_cyl_texture()
82 v = v + tex->rot.y; in image_cyl_texture()
87 return ImageMap((rawimage *)tex->img, u, v); in image_cyl_texture()
91 color image_sphere_texture(vector *hit, texture *tex, ray *ry) { in image_sphere_texture() argument
95 rh.x = hit->x - tex->ctr.x; in image_sphere_texture()
96 rh.y = hit->y - tex->ctr.y; in image_sphere_texture()
97 rh.z = hit->z - tex->ctr.z; in image_sphere_texture()
101 u = u * tex->scale.x; in image_sphere_texture()
102 u = u + tex->rot.x; in image_sphere_texture()
107 v = v * tex->scale.y; in image_sphere_texture()
108 v = v + tex->rot.y; in image_sphere_texture()
113 return ImageMap((rawimage *)tex->img, u, v); in image_sphere_texture()
117 color image_plane_texture(vector *hit, texture *tex, ray *ry) { in image_plane_texture() argument
121 pnt.x = hit->x - tex->ctr.x; in image_plane_texture()
122 pnt.y = hit->y - tex->ctr.y; in image_plane_texture()
123 pnt.z = hit->z - tex->ctr.z; in image_plane_texture()
125 VDOT(u, tex->uaxs, pnt); in image_plane_texture()
129 VDOT(v, tex->vaxs, pnt); in image_plane_texture()
133 u = u * tex->scale.x; in image_plane_texture()
134 u = u + tex->rot.x; in image_plane_texture()
139 v = v * tex->scale.y; in image_plane_texture()
140 v = v + tex->rot.y; in image_plane_texture()
145 return ImageMap((rawimage *)tex->img, u, v); in image_plane_texture()
148 color grit_texture(vector *hit, texture *tex, ray *ry) { in grit_texture() argument
156 col.r = tex->col.r * fnum; in grit_texture()
157 col.g = tex->col.g * fnum; in grit_texture()
158 col.b = tex->col.b * fnum; in grit_texture()
163 color checker_texture(vector *hit, texture *tex, ray *ry) { in checker_texture() argument
168 xh = hit->x - tex->ctr.x; in checker_texture()
171 yh = hit->y - tex->ctr.y; in checker_texture()
174 zh = hit->z - tex->ctr.z; in checker_texture()
192 color cyl_checker_texture(vector *hit, texture *tex, ray *ry) { in cyl_checker_texture() argument
198 rh.x = hit->x - tex->ctr.x; in cyl_checker_texture()
199 rh.y = hit->y - tex->ctr.y; in cyl_checker_texture()
200 rh.z = hit->z - tex->ctr.z; in cyl_checker_texture()
223 color wood_texture(vector *hit, texture *tex, ray *ry) { in wood_texture() argument
229 x = (hit->x - tex->ctr.x) * 1000; in wood_texture()
230 y = (hit->y - tex->ctr.y) * 1000; in wood_texture()
231 z = (hit->z - tex->ctr.z) * 1000; in wood_texture()
336 color marble_texture(vector *hit, texture *tex, ray *ry) { in marble_texture() argument
368 color gnoise_texture(vector *hit, texture *tex, ray *ry) { in gnoise_texture() argument
372 f = Noise((hit->x - tex->ctr.x), (hit->y - tex->ctr.y), (hit->z - tex->ctr.z)); in gnoise_texture()
379 col.r = tex->col.r * f; in gnoise_texture()
380 col.g = tex->col.g * f; in gnoise_texture()
381 col.b = tex->col.b * f; in gnoise_texture()