xxxxxxxxxx
21
precision mediump float;
uniform sampler2D depth;
uniform sampler2D shadow;
uniform sampler2D shadowBlurred;
in vec2 pos;
out vec4 colour;
// Noise algo from:
// https://www.shadertoy.com/view/4dS3Wd
void main() {
float d = texture(depth, pos).r;
vec4 sNormal = texture(shadow, pos);
vec4 sBlur = texture(shadowBlurred, pos);
colour = mix(sNormal, sBlur, d);
}