ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/view.C
(Generate patch)

Comparing libgender/view.C (file contents):
Revision 1.72 by root, Fri Nov 5 16:02:34 2004 UTC vs.
Revision 1.73 by root, Sat Nov 6 00:06:33 2004 UTC

309{ 309{
310 using namespace shader::compile; 310 using namespace shader::compile;
311 311
312 lightvec = xyz (lightpos - model_view_matrix * vin.vertex); 312 lightvec = xyz (lightpos - model_view_matrix * vin.vertex);
313 camdist = max (1 - length (lightvec) / radius, 0); 313 camdist = max (1 - length (lightvec) / radius, 0);
314}
315 314
316shader::temp_3f linear_light::operator ()() 315 fsh ();
316}
317
318void linear_light::fsh ()
317{ 319{
318 using namespace shader::compile; 320 using namespace shader::compile;
319 321
320 temp_3f res; 322 sh_lightvec = lightvec;
321 res = float3 (c.r / 255.F, c.g / 255.F, c.b / 255.F) * (min (intensity * camdist * 0.6F + 0.9F, 1.F)); 323 sh_colour = float3 (c.r / 255.F, c.g / 255.F, c.b / 255.F) * (min (intensity * camdist * 0.6F + 0.9F, 1.F));
322
323 return res;
324} 324}
325 325
326 326

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines