EEVEE Next: Volumes #107176

Merged
Miguel Pozo merged 126 commits from pragma37/blender:pull-eevee-next-volumes into main 2023-08-04 16:47:22 +02:00
4 changed files with 14 additions and 1 deletions
Showing only changes of commit 31520fd7d3 - Show all commits

View File

@ -71,6 +71,7 @@ void Instance::init(const int2 &output_res,
motion_blur.init();
main_view.init();
irradiance_cache.init();
volumes.init();
}
void Instance::set_time(float time)
@ -107,6 +108,7 @@ void Instance::begin_sync()
shadows.begin_sync();
pipelines.begin_sync();
cryptomatte.begin_sync();
volumes.begin_sync();
gpencil_engine_enabled = false;
@ -172,6 +174,7 @@ void Instance::object_sync(Object *ob)
sync.sync_mesh(ob, ob_handle, res_handle, ob_ref);
break;
case OB_VOLUME:
volumes.sync_object(ob, ob_handle, res_handle);
break;
case OB_CURVES:
sync.sync_curves(ob, ob_handle, res_handle);
@ -207,6 +210,7 @@ void Instance::end_sync()
film.end_sync();
cryptomatte.end_sync();
pipelines.end_sync();
volumes.end_sync();
}
void Instance::render_sync()

View File

@ -32,6 +32,7 @@
#include "eevee_shadow.hh"
#include "eevee_sync.hh"
#include "eevee_view.hh"
#include "eevee_volumes.hh"
#include "eevee_world.hh"
namespace blender::eevee {
@ -64,6 +65,7 @@ class Instance {
MainView main_view;
World world;
IrradianceCache irradiance_cache;
Volumes volumes;
/** Input data. */
Depsgraph *depsgraph;
@ -108,7 +110,8 @@ class Instance {
render_buffers(*this),
main_view(*this),
world(*this),
irradiance_cache(*this){};
irradiance_cache(*this),
volumes(*this){};
~Instance(){};
void init(const int2 &output_res,

View File

@ -123,6 +123,8 @@ void ShadingView::render()
/* TODO(fclem): Move it after the first prepass (and hiz update) once pipeline is stabilized. */
inst_.lights.set_view(render_view_new_, extent_);
inst_.volumes.draw_compute(render_view_new_);
inst_.pipelines.deferred.render(render_view_new_, prepass_fb_, combined_fb_, extent_);
// inst_.lightprobes.draw_cache_display();
@ -137,6 +139,8 @@ void ShadingView::render()
inst_.irradiance_cache.debug_draw(render_view_new_, combined_fb_);
inst_.volumes.draw_resolve(render_view_new_, combined_fb_);
GPUTexture *combined_final_tx = render_postfx(rbufs.combined_tx);
inst_.film.accumulate(sub_view_, combined_final_tx);

View File

@ -1,5 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#include "eevee_shader_shared.hh"
namespace blender::eevee {