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

Comparing libgender/material.C (file contents):
Revision 1.32 by root, Wed Nov 3 03:35:13 2004 UTC vs.
Revision 1.33 by root, Wed Nov 3 03:36:16 2004 UTC

87 ctx.pass_data->l->vsh (); 87 ctx.pass_data->l->vsh ();
88 88
89 po->vsh->compile (shader::shader_builder::stop ()); 89 po->vsh->compile (shader::shader_builder::stop ());
90 90
91 shader::shader_builder::start (); 91 shader::shader_builder::start ();
92 shader::compile::fout.frag_color = shader::compile::float4 (1., 1., 0., 1.);
92 fsh (ctx); 93 fsh (ctx);
93 po->fsh->compile (shader::shader_builder::stop ()); 94 po->fsh->compile (shader::shader_builder::stop ());
94 95
95 po->link (); 96 po->link ();
96 97
145 146
146 fac = dot (normalize (normal), normalize (lightvec)); 147 fac = dot (normalize (normal), normalize (lightvec));
147 fac = pow (max (fac, 0.0), 2); 148 fac = pow (max (fac, 0.0), 2);
148 xyz (fout.frag_color) = texture_2d (texvar, texcoord) * lc * fac; 149 xyz (fout.frag_color) = texture_2d (texvar, texcoord) * lc * fac;
149 } 150 }
150 else
151 fout.frag_color = float4(1,1,1,1);
152} 151}
153 152
154void test_material::enable (view &ctx) 153void test_material::enable (view &ctx)
155{ 154{
156 material::enable (ctx); 155 material::enable (ctx);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines