git-svn-id: svn://db.shs.com.ru/libs@52 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -49,7 +49,6 @@ void calcLight(in int index, in vec3 n, in vec3 v, in vec4 v2) {
|
||||
ndlc = (1. - NdotHs) / NdotHs;
|
||||
der = NdotHs * (sh_mul + ndlc);
|
||||
si += spot * qgl_Light[index].color.rgb * (sh_mul / (der*der) / 3.1416);
|
||||
//si += der;//dot(n, halfV);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +68,6 @@ void main(void) {
|
||||
vec3 dc = v0.rgb, n = v1.xyz * 2. - vec3(1.);
|
||||
float height = v2.w;
|
||||
li = qgl_AmbientLight.color.rgb * qgl_AmbientLight.intensity;
|
||||
//li = vec3(0.);
|
||||
si = vec3(0.);
|
||||
|
||||
float posz = z_near * z_far / (texelFetch(td, tc, 0).r * (z_far - z_near) - z_far);
|
||||
@@ -94,6 +92,6 @@ void main(void) {
|
||||
qgl_FragData[0].rgb = li * dc + si * v2.rgb + v3.rgb + texture(t_pp, tc).rgb;
|
||||
//qgl_FragData[0].rgb = vec3(abs(lpos.xyz - pos.xyz)/10);
|
||||
//qgl_FragData[0].rgb = vec3(ldist/1000);
|
||||
//qgl_FragData[0].rgb = vec3(length(v4.xyz)/10);
|
||||
qgl_FragData[0].rgb = vec3(texture(qgl_Light[0].shadow, vec3(qgl_FragTexture.xy, 0.))*1000+0.5);
|
||||
//qgl_FragData[0].a = 0.;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user