2 import ambientocclusion;
7 float sample = depth_ratio.x/(texture(depth, texcoord).r-depth_ratio.y);
10 for(int i=0; i<=3; ++i)
11 for(int j=0; j<=3; ++j)
13 vec2 offs = vec2(float(i)-1.5, float(j)-1.5)/screen_size;
14 float dxy = length(offs)*-sample;
15 float dz = depth_ratio.x/(texture(depth, texcoord+offs).r-depth_ratio.y)-sample;
18 sum += texture(occlusion, texcoord+offs).r;
22 frag_color = texture(source, texcoord)*sum/count;