1 const int max_samples = 32;
3 uniform mat4 projection_matrix;
5 uniform sampler2D depth;
6 uniform sampler2D occlusion;
7 uniform sampler2D rotate;
8 uniform AmbientOcclusionParams
10 mat4 inverse_projection;
12 vec3 sample_points[max_samples];
14 float occlusion_radius;
17 #pragma MSP stage(fragment)
18 vec3 project(vec3 position)
20 vec4 pp = projection_matrix*vec4(position, 1.0);
24 vec3 unproject(vec3 position)
26 vec4 upp = inverse_projection*vec4(position, 1.0);