EEVEE Next: Ambient Occlusion #108398

Merged
Miguel Pozo merged 29 commits from pragma37/blender:pull-eevee-next-ao into main 2023-06-30 19:37:37 +02:00
3 changed files with 9 additions and 5 deletions
Showing only changes of commit b7d67932e6 - Show all commits

View File

@ -54,6 +54,10 @@ void AmbientOcclusion::sync()
render_pass_ps_.init();
render_pass_ps_.shader_set(inst_.shaders.static_shader_get(AMBIENT_OCCLUSION_PASS));
render_pass_ps_.bind_texture(RBUFS_UTILITY_TEX_SLOT, &inst_.pipelines.utility_tx);
inst_.sampling.bind_resources(&render_pass_ps_);
inst_.hiz_buffer.bind_resources(&render_pass_ps_);
bind_resources(&render_pass_ps_);
render_pass_ps_.bind_image("in_normal_img", &rp_normal_tx_);

View File

@ -49,9 +49,6 @@ class AmbientOcclusion {
template<typename T> void bind_resources(draw::detail::PassBase<T> *pass)
{
inst_.sampling.bind_resources(pass);
inst_.hiz_buffer.bind_resources(pass);
pass->bind_texture(RBUFS_UTILITY_TEX_SLOT, &inst_.pipelines.utility_tx);
pass->bind_ubo(AO_BUF_SLOT, &data_);
pragma37 marked this conversation as resolved Outdated

Do not bind other resources here. Will result in double binds and it is against the design of this function.

Do not bind other resources here. Will result in double binds and it is against the design of this function.
}
};

View File

@ -150,8 +150,9 @@ void ForwardPipeline::sync()
inst_.lights.bind_resources(&opaque_ps_);
inst_.shadows.bind_resources(&opaque_ps_);
inst_.sampling.bind_resources(&opaque_ps_);
inst_.cryptomatte.bind_resources(&opaque_ps_);
inst_.hiz_buffer.bind_resources(&opaque_ps_);
inst_.ambient_occlusion.bind_resources(&opaque_ps_);
inst_.cryptomatte.bind_resources(&opaque_ps_);
}
opaque_single_sided_ps_ = &opaque_ps_.sub("SingleSided");
@ -178,6 +179,7 @@ void ForwardPipeline::sync()
inst_.lights.bind_resources(&sub);
inst_.shadows.bind_resources(&sub);
inst_.sampling.bind_resources(&sub);
inst_.hiz_buffer.bind_resources(&sub);
inst_.ambient_occlusion.bind_resources(&sub);
}
}
@ -332,8 +334,9 @@ void DeferredLayer::begin_sync()
gbuffer_ps_.bind_ubo(RBUFS_BUF_SLOT, &inst_.render_buffers.data);
inst_.sampling.bind_resources(&gbuffer_ps_);
inst_.cryptomatte.bind_resources(&gbuffer_ps_);
inst_.hiz_buffer.bind_resources(&gbuffer_ps_);
inst_.ambient_occlusion.bind_resources(&gbuffer_ps_);
inst_.cryptomatte.bind_resources(&gbuffer_ps_);
}
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_CUSTOM | DRW_STATE_DEPTH_EQUAL |