X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=builtin_data%2F_ambientocclusion_occlude.glsl;h=62fd153b712589e205f73738887a7db4e05f05c9;hb=1e3b07299f798983ee0b861121a65ca2e8c8830a;hp=e1900323a6cc9a66432f4d70e29312dcaa5a92c0;hpb=9a63244c1342337915c4610401a24c09fa72cc3d;p=libs%2Fgl.git diff --git a/builtin_data/_ambientocclusion_occlude.glsl b/builtin_data/_ambientocclusion_occlude.glsl index e1900323..62fd153b 100644 --- a/builtin_data/_ambientocclusion_occlude.glsl +++ b/builtin_data/_ambientocclusion_occlude.glsl @@ -1,7 +1,8 @@ -import postprocess; +import flat_effect; import _ambientocclusion; #pragma MSP stage(fragment) +layout(location=0) out float frag_out; void main() { vec4 rv = texture(rotate, gl_FragCoord.xy/4.0)*2.0-1.0; @@ -13,13 +14,13 @@ void main() for(int i=0; i=min_depth) + float sample_depth = texture(depth, psp.xy*0.5+0.5).r; + if(sample_depth>=min_depth) { - if(sample