#define PI 3.14 extern float yresolution; vec4 effect(vec4 color,Image texture,vec2 texture_coords,vec2 screen_coords){ //Iterate through the occluder map's y-axis. for(float y=0.;y0.1 )return vec4(vec3(y/yresolution),1.);//collision check, alpha>0.1 means transparent } return vec4(1.,1.,1.,1.);//return max distance 1 }