EEVEE Next: Ambient Occlusion #108398
|
@ -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_);
|
||||
|
|
|
@ -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
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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 |
|
||||
|
|
Loading…
Reference in New Issue
Do not bind other resources here. Will result in double binds and it is against the design of this function.