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

Comparing libgender/fsh.cg (file contents):
Revision 1.13 by root, Wed Oct 6 00:33:42 2004 UTC vs.
Revision 1.14 by root, Wed Oct 6 07:45:20 2004 UTC

14pixelOut main(vertexOut IN) 14pixelOut main(vertexOut IN)
15{ 15{
16 pixelOut OUT; 16 pixelOut OUT;
17 17
18 half SpecExpon = 200; 18 half SpecExpon = 200;
19 float4 AmbiColor = { 0.5, 0.5, 0.5, 1.0 };
19 float4 LightColor = { 1, 1, 1, 1 }; 20 float4 LightColor = { 1, 1, 1, 1 };
20 21
21 half3 Ln = normalize (IN.LightVec); 22 half3 Ln = normalize (IN.LightVec);
22 half3 Nn = normalize (IN.WorldNormal); 23 half3 Nn = normalize (IN.WorldNormal);
23 half3 Vn = normalize (IN.WorldView); 24 half3 Vn = normalize (IN.WorldView);
28 29
29 half4 litV = lit (ldn, hdn, SpecExpon); 30 half4 litV = lit (ldn, hdn, SpecExpon);
30 //half4 diffContrib = glstate.material.diffuse * (litV.y * LightColor + glstate.lightmodel.ambient); 31 //half4 diffContrib = glstate.material.diffuse * (litV.y * LightColor + glstate.lightmodel.ambient);
31 //half4 specContrib = litV.y * litV.z * LightColor; 32 //half4 specContrib = litV.y * litV.z * LightColor;
32 //half4 result = diffContrib + specContrib; 33 //half4 result = diffContrib + specContrib;
33 half4 result = glstate.material.diffuse * litV.y + LightColor * litV.z; 34 half4 result = AmbiColor + glstate.material.diffuse * litV.y + LightColor * litV.z;
34 35
35 OUT.col = result; 36 OUT.col = result;
36 return OUT; 37 return OUT;
37} 38}
38 39

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines