X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=shaderlib%2Fambientocclusion.glsl;h=89d13357b67404dd5f06c180541d5723f372a34b;hb=refs%2Fheads%2Fmaster;hp=a9873b1d1fe2a4778fed2cd6fe664e404ff13ea5;hpb=99d25b5ef615a23ef63645fea87596b3384b5ede;p=libs%2Fgl.git diff --git a/shaderlib/ambientocclusion.glsl b/shaderlib/ambientocclusion.glsl deleted file mode 100644 index a9873b1d..00000000 --- a/shaderlib/ambientocclusion.glsl +++ /dev/null @@ -1,29 +0,0 @@ -const int max_samples = 32; - -uniform mat4 projection_matrix; - -uniform sampler2D depth; -uniform sampler2D occlusion; -uniform sampler2D rotate; -uniform AmbientOcclusionParams -{ - mat4 inverse_projection; - float darkness; - vec3 sample_points[max_samples]; - int n_samples; - float occlusion_radius; - float edge_depth_threshold; -}; - -#pragma MSP stage(fragment) -vec3 project(vec3 position) -{ - vec4 pp = projection_matrix*vec4(position, 1.0); - return pp.xyz/pp.w; -} - -vec3 unproject(vec3 position) -{ - vec4 upp = inverse_projection*vec4(position, 1.0); - return upp.xyz/upp.w; -}