… | |
… | |
8 | float3 test1 : TEXCOORD5; |
8 | float3 test1 : TEXCOORD5; |
9 | float3 test2 : TEXCOORD6; |
9 | float3 test2 : TEXCOORD6; |
10 | }; |
10 | }; |
11 | |
11 | |
12 | struct pixelOut { |
12 | struct pixelOut { |
13 | float4 col : COLOR; |
13 | float3 col : COLOR; |
14 | float depth : DEPTH; |
14 | float depth : DEPTH; |
15 | }; |
15 | }; |
16 | |
16 | |
17 | pixelOut main(vertexOut IN, uniform sampler2D Texture) |
17 | pixelOut main(vertexOut IN, uniform sampler2D Texture) |
18 | { |
18 | { |
… | |
… | |
34 | half3 diffContrib = diffuse_color * ((litV.y + 0.3) * LightColor + glstate.lightmodel.ambient); |
34 | half3 diffContrib = diffuse_color * ((litV.y + 0.3) * LightColor + glstate.lightmodel.ambient); |
35 | half3 specContrib = litV.y * litV.z * LightColor; |
35 | half3 specContrib = litV.y * litV.z * LightColor; |
36 | half4 result = (diffContrib + specContrib).xyzx; |
36 | half4 result = (diffContrib + specContrib).xyzx; |
37 | //half3 result = diffuse_color * litV.y + LightColor * litV.z; |
37 | //half3 result = diffuse_color * litV.y + LightColor * litV.z; |
38 | |
38 | |
39 | OUT.col = result; |
39 | OUT.col = result.xyz; |
40 | //float depth = IN.HPosition.z / IN.HPosition.w; |
40 | //float depth = IN.HPosition.z / IN.HPosition.w; |
41 | //OUT.depth = 0.5 * depth + 0.5; |
41 | //OUT.depth = 0.5 * depth + 0.5; |
42 | return OUT; |
42 | return OUT; |
43 | } |
43 | } |
44 | |
44 | |