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 7 additions and 6 deletions
Showing only changes of commit a11d70fb3d - Show all commits

View File

@ -96,7 +96,8 @@
/* Only during shadow rendering. */
#define SHADOW_RENDER_MAP_SLOT 13
#define RBUFS_UTILITY_TEX_SLOT 14
#define AO_HORIZONS_TEX_SLOT 15
#define HIZ_TEX_SLOT 15
#define AO_HORIZONS_TEX_SLOT 16
/* Images. */
#define RBUFS_COLOR_SLOT 0
@ -111,6 +112,7 @@
#define VELOCITY_CAMERA_CURR_BUF 4
#define VELOCITY_CAMERA_NEXT_BUF 5
#define HIZ_BUF_SLOT 5
#define CAMERA_BUF_SLOT 6
#define RBUFS_BUF_SLOT 7
#define RAYTRACE_BUF_SLOT 8

View File

@ -76,11 +76,10 @@ class HiZBuffer {
DRW_shgroup_uniform_block_ref(grp, "hiz_buf", &data_);
}
/* TODO(fclem): Hardcoded bind slots. */
template<typename T> void bind_resources(draw::detail::PassBase<T> *pass)
{
pass->bind_texture("hiz_tx", &hiz_tx_);
pass->bind_ubo("hiz_buf", &data_);
pass->bind_texture(HIZ_TEX_SLOT, &hiz_tx_);
pass->bind_ubo(HIZ_BUF_SLOT, &data_);
}
};

View File

@ -6,8 +6,8 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_CREATE_INFO(eevee_hiz_data)
.sampler(15, ImageType::FLOAT_2D, "hiz_tx")
.uniform_buf(5, "HiZData", "hiz_buf");
.sampler(HIZ_TEX_SLOT, ImageType::FLOAT_2D, "hiz_tx")
.uniform_buf(HIZ_BUF_SLOT, "HiZData", "hiz_buf");
GPU_SHADER_CREATE_INFO(eevee_hiz_update)
.do_static_compilation(true)