import postprocess;
import ambientocclusion;
-////// fragment
+#pragma MSP stage(fragment)
void main()
{
vec3 center = unproject(vec3(vertex.xy, texture(depth, texcoord).r));
{
vec2 offset = vec2(float(i)-1.5, float(j)-1.5)*tex_scale;
float occ = texture(occlusion, texcoord+offset).r;
- float depth = texture(depth, texcoord+offset).r;
- if(depth>=min_depth && depth<=max_depth)
+ float sample = texture(depth, texcoord+offset).r;
+ if(sample>=min_depth && sample<=max_depth)
{
sum += occ;
- count += 1;
+ count += 1.0;
}
}
vec4 src_color = texture(source, texcoord);