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