git-svn-id: svn://db.shs.com.ru/libs@53 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -92,6 +92,10 @@ 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(texture(qgl_Light[0].shadow, vec3(qgl_FragTexture.xy, 0.))*1000+0.5);
|
||||
vec2 shp = (vec4(qgl_FragTexture.xy, 1, 1) *transpose(qgl_Light[0].shadowMatrix)).xy;
|
||||
float shd = 1./texture(qgl_Light[0].shadow, shp).r;
|
||||
shd = shd*shd;// - ldist;
|
||||
qgl_FragData[0].rgb = vec3(abs(shd)/1000000);
|
||||
//qgl_FragData[0].rgb = vec3(*1000);
|
||||
//qgl_FragData[0].a = 0.;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#version 130
|
||||
#version 150
|
||||
|
||||
in vec4 pos;
|
||||
|
||||
void main(void) {
|
||||
gl_FragColor.r = 1. / gl_FragCoord.w;
|
||||
qgl_FragData[0].r = 1. / pos.w;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 130
|
||||
#version 150
|
||||
|
||||
out vec4 pos;
|
||||
|
||||
void main(void) {
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
gl_Position = ftransform();
|
||||
pos = qgl_ftransform();
|
||||
qgl_FragTexture = qgl_Texture;
|
||||
gl_Position = pos;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user