combine_shader(Resources::get_global().get<Program>("_ambientocclusion_combine.glsl.shader")),
quad(Resources::get_global().get<Mesh>("_fullscreen_quad.mesh")),
linear_sampler(Resources::get_global().get<Sampler>("_linear_clamp.samp")),
- nearest_sampler(Resources::get_global().get<Sampler>("_nearest_clamp.samp"))
+ nearest_clamp_sampler(Resources::get_global().get<Sampler>("_nearest_clamp.samp")),
+ nearest_sampler(Resources::get_global().get<Sampler>("_nearest.samp"))
{
unsigned seed = 1;
rotate_lookup.storage(RGBA8, 4, 4, 1);
void AmbientOcclusion::render(Renderer &renderer, const Texture2D &color, const Texture2D &depth)
{
Renderer::Push push(renderer);
- renderer.set_texture("source", &color, &nearest_sampler);
- renderer.set_texture("depth", &depth, &nearest_sampler);
+ renderer.set_texture("source", &color, &nearest_clamp_sampler);
+ renderer.set_texture("depth", &depth, &nearest_clamp_sampler);
renderer.set_texture("occlusion", &occlude_target.get_target_texture(RENDER_COLOR), &linear_sampler);
renderer.set_texture("rotate", &rotate_lookup, &nearest_sampler);
renderer.set_shader_program(&occlude_shader, &shdata);