Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/engines/eevee_next/eevee_light.hh')
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_light.hh21
1 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_light.hh b/source/blender/draw/engines/eevee_next/eevee_light.hh
index aad798ccec2..9bacc180ea8 100644
--- a/source/blender/draw/engines/eevee_next/eevee_light.hh
+++ b/source/blender/draw/engines/eevee_next/eevee_light.hh
@@ -116,16 +116,12 @@ class LightModule {
/** Bitmap of lights touching each tiles. */
LightCullingTileBuf culling_tile_buf_ = {"LightCull_tile"};
/** Culling compute passes. */
- DRWPass *culling_select_ps_ = nullptr;
- DRWPass *culling_sort_ps_ = nullptr;
- DRWPass *culling_zbin_ps_ = nullptr;
- DRWPass *culling_tile_ps_ = nullptr;
+ PassSimple culling_ps_ = {"LightCulling"};
/** Total number of words the tile buffer needs to contain for the render resolution. */
uint total_word_count_ = 0;
/** Debug Culling visualization. */
- DRWPass *debug_draw_ps_ = nullptr;
- /* GPUTexture *input_depth_tx_ = nullptr; */
+ PassSimple debug_draw_ps_ = {"LightCulling.Debug"};
public:
LightModule(Instance &inst) : inst_(inst){};
@@ -138,9 +134,9 @@ class LightModule {
/**
* Update acceleration structure for the given view.
*/
- void set_view(const DRWView *view, const int2 extent);
+ void set_view(View &view, const int2 extent);
- void debug_draw(GPUFrameBuffer *view_fb);
+ void debug_draw(View &view, GPUFrameBuffer *view_fb);
void bind_resources(DRWShadingGroup *grp)
{
@@ -154,6 +150,15 @@ class LightModule {
#endif
}
+ template<typename T> void bind_resources(draw::detail::PassBase<T> *pass)
+ {
+ /* Storage Buf. */
+ pass->bind_ssbo(LIGHT_CULL_BUF_SLOT, &culling_data_buf_);
+ pass->bind_ssbo(LIGHT_BUF_SLOT, &culling_light_buf_);
+ pass->bind_ssbo(LIGHT_ZBIN_BUF_SLOT, &culling_zbin_buf_);
+ pass->bind_ssbo(LIGHT_TILE_BUF_SLOT, &culling_tile_buf_);
+ }
+
private:
void culling_pass_sync();
void debug_pass_sync();