X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=shaderlib%2Fambientocclusion_combine.glsl;h=c1e7f27270a1388703ac8cc744901278180f2ac3;hp=05aea60a6c811d3f802f6a2df53db08a99597d6d;hb=99d25b5ef615a23ef63645fea87596b3384b5ede;hpb=81e0e39fefd8f50ae2367fe821d58af6273bcea2 diff --git a/shaderlib/ambientocclusion_combine.glsl b/shaderlib/ambientocclusion_combine.glsl index 05aea60a..c1e7f272 100644 --- a/shaderlib/ambientocclusion_combine.glsl +++ b/shaderlib/ambientocclusion_combine.glsl @@ -15,7 +15,7 @@ void main() vec2 sample_coord = texcoord+offset*tex_scale; float occ = texture(occlusion, sample_coord).r; float sample = texture(depth, sample_coord).r; - float z_range = occlusion_radius*length(offset)*0.1; + float z_range = occlusion_radius*length(offset)*edge_depth_threshold; float min_depth = project(vec3(center.xy, center.z+z_range)).z; float max_depth = project(vec3(center.xy, center.z-z_range)).z; if(sample>=min_depth && sample<=max_depth)