X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=shaderlib%2Fambientocclusion.glsl;h=89d13357b67404dd5f06c180541d5723f372a34b;hb=53dac3ba3cb3a1e4ed23d5fa459187acde7a4904;hp=a9873b1d1fe2a4778fed2cd6fe664e404ff13ea5;hpb=99d25b5ef615a23ef63645fea87596b3384b5ede;p=libs%2Fgl.git diff --git a/shaderlib/ambientocclusion.glsl b/shaderlib/ambientocclusion.glsl index a9873b1d..89d13357 100644 --- a/shaderlib/ambientocclusion.glsl +++ b/shaderlib/ambientocclusion.glsl @@ -18,6 +18,8 @@ uniform AmbientOcclusionParams #pragma MSP stage(fragment) vec3 project(vec3 position) { + if(position.z>=0.0) + return vec3(0.0, 0.0, -1.0); vec4 pp = projection_matrix*vec4(position, 1.0); return pp.xyz/pp.w; }