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

Comparing libgender/vsh.cg (file contents):
Revision 1.6 by root, Tue Oct 5 10:28:49 2004 UTC vs.
Revision 1.7 by root, Tue Oct 5 11:06:06 2004 UTC

14 14
15vertexOut main(vertexIn IN) 15vertexOut main(vertexIn IN)
16{ 16{
17 vertexOut OUT; 17 vertexOut OUT;
18 18
19 float3 LightPos = { 0, 0, 0 }; 19 float4 LightPos = { 0, 2, 5, 1 };
20 20
21 float4 Pw = mul (glstate.matrix.mvp, IN.Position); 21 OUT.WorldNormal = normalize (IN.Normal.xyz);
22 22 OUT.EyeVec = normalize (IN.Position).xyz;
23 OUT.WorldNormal = normalize (mul (glstate.matrix.modelview[0], IN.Normal).xyz);
24 OUT.EyeVec = normalize (mul (glstate.matrix.modelview[0], IN.Position).xyz);
25 OUT.LightVec = normalize (LightPos - IN.Position).xyz; 23 OUT.LightVec = normalize (LightPos - IN.Position).xyz;
24 OUT.HPosition = mul (glstate.matrix.mvp, IN.Position);
26 OUT.TexCoord = IN.UV; 25 OUT.TexCoord = IN.UV;
27 OUT.HPosition = Pw;
28 26
29 return OUT; 27 return OUT;
30} 28}
31 29

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines