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

Comparing cvsroot/libgender/material.C (file contents):
Revision 1.35 by root, Thu Nov 4 04:46:58 2004 UTC vs.
Revision 1.36 by root, Thu Nov 4 04:49:04 2004 UTC

145 lc = (*ctx.pass_data->l)(); 145 lc = (*ctx.pass_data->l)();
146 146
147 temp_3f rot1, rot2, rot3; 147 temp_3f rot1, rot2, rot3;
148 148
149 rot1 = yxz (texture_2d (normvar, texcoord) * 2.F - 1.F); 149 rot1 = yxz (texture_2d (normvar, texcoord) * 2.F - 1.F);
150 rot2 = float3 (x(rot1), -z(rot1), y(rot1)); 150 rot2 = float3 (x(rot1), z(rot1), -y(rot1));
151 rot3 = float3 (-y(rot1), x(rot1), z(rot1)); 151 rot3 = float3 (y(rot1), -x(rot1), z(rot1));
152 152
153 normal = mat3 (rot1, rot2, rot3) * normal; 153 normal = mat3 (rot1, rot2, rot3) * normal;
154 154
155 fac = dot (normalize (normal), normalize (lightvec)); 155 fac = dot (normalize (normal), normalize (lightvec));
156 fac = pow (max (fac, 0.0), 6); 156 fac = pow (max (fac, 0.0), 6);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines