… | |
… | |
28 | half3 Hn = normalize (Ln + Vn); |
28 | half3 Hn = normalize (Ln + Vn); |
29 | half ldn = dot (Ln, Nn); |
29 | half ldn = dot (Ln, Nn); |
30 | half hdn = dot (Hn, Nn); |
30 | half hdn = dot (Hn, Nn); |
31 | |
31 | |
32 | half4 litV = lit (ldn, hdn, SpecExpon); |
32 | half4 litV = lit (ldn, hdn, SpecExpon); |
33 | half4 diffContrib = diffuse_color * ((litV.y + 0.1) * LightColor + glstate.lightmodel.ambient); |
33 | half4 diffContrib = diffuse_color * ((litV.y + 0.3) * LightColor + glstate.lightmodel.ambient); |
34 | half4 specContrib = litV.y * litV.z * LightColor; |
34 | half4 specContrib = litV.y * litV.z * LightColor; |
35 | half4 result = diffContrib + specContrib; |
35 | half4 result = diffContrib + specContrib; |
36 | //half4 result = diffuse_color * litV.y + LightColor * litV.z; |
36 | //half4 result = diffuse_color * litV.y + LightColor * litV.z; |
37 | |
37 | |
38 | OUT.col = result; |
38 | OUT.col = result; |