Lines Matching refs:light

112          struct gl_light *light = &ctx->Light.Light[l];  in TAG()  local
123 if (!(light->_Flags & LIGHT_POSITIONAL)) { in TAG()
125 COPY_3V(VP, light->_VP_inf_norm); in TAG()
126 attenuation = light->_VP_inf_spot_attenuation; in TAG()
131 SUB_3V(VP, light->_Position, vertex); in TAG()
140 attenuation = 1.0F / (light->ConstantAttenuation + d * in TAG()
141 (light->LinearAttenuation + d * in TAG()
142 light->QuadraticAttenuation)); in TAG()
145 if (light->_Flags & LIGHT_SPOT) { in TAG()
146 GLfloat PV_dot_dir = - DOT3(VP, light->_NormSpotDirection); in TAG()
148 if (PV_dot_dir<light->_CosCutoff) { in TAG()
152 GLfloat spot = powf(PV_dot_dir, light->SpotExponent); in TAG()
166 ACC_SCALE_SCALAR_3V(sum[0], attenuation, light->_MatAmbient[0]); in TAG()
177 ACC_SCALE_SCALAR_3V( sum[1], attenuation, light->_MatAmbient[1]); in TAG()
184 COPY_3V(contrib, light->_MatAmbient[side]); in TAG()
185 ACC_SCALE_SCALAR_3V(contrib, n_dot_VP, light->_MatDiffuse[side]); in TAG()
197 else if (light->_Flags & LIGHT_POSITIONAL) { in TAG()
203 h = light->_h_inf_norm; in TAG()
213 light->_MatSpecular[side]); in TAG()
291 struct gl_light *light = &ctx->Light.Light[l]; in TAG() local
302 if (!(light->_Flags & LIGHT_POSITIONAL)) { in TAG()
304 COPY_3V(VP, light->_VP_inf_norm); in TAG()
305 attenuation = light->_VP_inf_spot_attenuation; in TAG()
310 SUB_3V(VP, light->_Position, vertex); in TAG()
319 attenuation = 1.0F / (light->ConstantAttenuation + d * in TAG()
320 (light->LinearAttenuation + d * in TAG()
321 light->QuadraticAttenuation)); in TAG()
324 if (light->_Flags & LIGHT_SPOT) { in TAG()
325 GLfloat PV_dot_dir = - DOT3(VP, light->_NormSpotDirection); in TAG()
327 if (PV_dot_dir<light->_CosCutoff) { in TAG()
331 GLfloat spot = powf(PV_dot_dir, light->SpotExponent); in TAG()
345 ACC_SCALE_SCALAR_3V(sum[0], attenuation, light->_MatAmbient[0]); in TAG()
356 ACC_SCALE_SCALAR_3V( sum[1], attenuation, light->_MatAmbient[1]); in TAG()
362 COPY_3V(contrib, light->_MatAmbient[side]); in TAG()
365 ACC_SCALE_SCALAR_3V(contrib, n_dot_VP, light->_MatDiffuse[side]); in TAG()
377 else if (light->_Flags & LIGHT_POSITIONAL) { in TAG()
383 h = light->_h_inf_norm; in TAG()
391 light->_MatSpecular[side]); in TAG()
426 const struct gl_light *light = in TAG() local
470 COPY_3V(base[0], light->_MatAmbient[0]); in TAG()
475 COPY_3V(base[1], light->_MatAmbient[1]); in TAG()
481 n_dot_VP = DOT3(normal, light->_VP_inf_norm); in TAG()
485 GLfloat n_dot_h = -DOT3(normal, light->_h_inf_norm); in TAG()
488 ACC_SCALE_SCALAR_3V(sum, -n_dot_VP, light->_MatDiffuse[1]); in TAG()
491 ACC_SCALE_SCALAR_3V(sum, spec, light->_MatSpecular[1]); in TAG()
499 GLfloat n_dot_h = DOT3(normal, light->_h_inf_norm); in TAG()
502 ACC_SCALE_SCALAR_3V(sum, n_dot_VP, light->_MatDiffuse[0]); in TAG()
505 ACC_SCALE_SCALAR_3V(sum, spec, light->_MatSpecular[0]); in TAG()
585 const struct gl_light *light = &ctx->Light.Light[l]; in TAG() local
588 ACC_3V(sum[0], light->_MatAmbient[0]); in TAG()
590 ACC_3V(sum[1], light->_MatAmbient[1]); in TAG()
593 n_dot_VP = DOT3(normal, light->_VP_inf_norm); in TAG()
596 ACC_SCALE_SCALAR_3V(sum[0], n_dot_VP, light->_MatDiffuse[0]); in TAG()
597 n_dot_h = DOT3(normal, light->_h_inf_norm); in TAG()
600 ACC_SCALE_SCALAR_3V( sum[0], spec, light->_MatSpecular[0]); in TAG()
605 ACC_SCALE_SCALAR_3V(sum[1], -n_dot_VP, light->_MatDiffuse[1]); in TAG()
606 n_dot_h = -DOT3(normal, light->_h_inf_norm); in TAG()
609 ACC_SCALE_SCALAR_3V( sum[1], spec, light->_MatSpecular[1]); in TAG()