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

Comparing libgender/shader.C (file contents):
Revision 1.12 by root, Sun Oct 24 02:13:43 2004 UTC vs.
Revision 1.13 by root, Sun Oct 24 16:06:56 2004 UTC

352 vsh->start (); 352 vsh->start ();
353 353
354 temp_4f lightpos; 354 temp_4f lightpos;
355 temp_3f wpos; 355 temp_3f wpos;
356 356
357 lightpos = vec4 (10, -10, 0, 1); 357 lightpos = vec4 (0, 10, 0, 1);
358 wpos = xyz (gl.model_view_matrix * vin.vertex); 358 wpos = xyz (gl.model_view_matrix * vin.vertex);
359 vout.position = gl.model_view_matrix_inverse_transpose * vin.vertex; 359 vout.position = gl.model_view_matrix_inverse_transpose * vin.vertex;
360 vout.tex_coord[0] = vin.tex_coord[0]; 360 vout.tex_coord[0] = vin.tex_coord[0];
361 vout.tex_coord[1] = normalize (lightpos - wpos); 361 vout.tex_coord[1] = normalize (lightpos - wpos);
362 vout.tex_coord[2] = normalize (wpos); 362 vout.tex_coord[2] = normalize (wpos);
363 vout.tex_coord[3] = normalize (xyz (gl.model_view_matrix_inverse_transpose) * vin.normal); 363 vout.tex_coord[3] = normalize (xyz (gl.model_view_matrix_inverse_transpose) * vin.normal);
364 vout.tex_coord[4] = normalize (xyz (gl.projection_matrix_inverse_transpose) - wpos); 364 vout.tex_coord[4] = normalize (xyz (gl.projection_matrix_inverse_transpose) - wpos);
365 365
366 vsh->end (); 366 vsh->end ();
367 //vsh->compile (); 367 vsh->compile ();
368 368
369 fragment_shader fsh; 369 fragment_shader fsh;
370 370
371 fsh->start (); 371 fsh->start ();
372 372

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines