--- libgender/fsh.cg 2004/10/06 14:37:34 1.17 +++ libgender/fsh.cg 2004/10/19 15:34:58 1.22 @@ -10,7 +10,7 @@ }; struct pixelOut { - float4 col : COLOR; + float4 col : COLOR; }; pixelOut main(vertexOut IN, uniform sampler2D Texture) @@ -18,7 +18,6 @@ pixelOut OUT; half SpecExpon = 200; - float4 AmbiColor = { 0.1, 0.1, 0.1, 1.0 }; float4 LightColor = { 1, 1, 1, 1 }; float4 diffuse_color = tex2D (Texture, IN.TexCoord.xy); @@ -30,13 +29,15 @@ half ldn = dot (Ln, Nn); half hdn = dot (Hn, Nn); - half4 litV = lit (ldn, hdn, SpecExpon); - half4 diffContrib = diffuse_color * (litV.y * LightColor + glstate.lightmodel.ambient); - half4 specContrib = litV.y * litV.z * LightColor; - half4 result = diffContrib + specContrib; - //half4 result = diffuse_color * litV.y + LightColor * litV.z; + half3 litV = lit (ldn, hdn, SpecExpon); + half3 diffContrib = diffuse_color * ((litV.y + 0.3) * LightColor + glstate.lightmodel.ambient); + half3 specContrib = litV.y * litV.z * LightColor; + half4 result = (diffContrib + specContrib).xyzx; + //half3 result = diffuse_color * litV.y + LightColor * litV.z; OUT.col = result; + //float depth = IN.HPosition.z / IN.HPosition.w; + //OUT.depth = 0.5 * depth + 0.5; return OUT; }