EEVEE-Next: Add horizon scan to raytracing module #114259
|
@ -54,6 +54,11 @@ bool PathTraceTile::get_pass_pixels(const string_view pass_name,
|
|||
}
|
||||
|
||||
pass = buffer_params.get_actual_display_pass(pass);
|
||||
if (pass == nullptr) {
|
||||
/* Happens when interactive sesssion changes display pass but render
|
||||
* buffer does not contain it yet. */
|
||||
return false;
|
||||
}
|
||||
|
||||
const float exposure = buffer_params.exposure;
|
||||
const int num_samples = path_trace_.get_num_render_tile_samples();
|
||||
|
|
|
@ -154,6 +154,11 @@ PassAccessor::PassAccessInfo PathTraceWork::get_display_pass_access_info(PassMod
|
|||
const BufferParams ¶ms = buffers_->params;
|
||||
|
||||
const BufferPass *display_pass = params.get_actual_display_pass(film_->get_display_pass());
|
||||
if (display_pass == nullptr) {
|
||||
/* Happens when interactive sesssion changes display pass but render
|
||||
* buffer does not contain it yet. */
|
||||
return PassAccessor::PassAccessInfo();
|
||||
}
|
||||
|
||||
PassAccessor::PassAccessInfo pass_access_info;
|
||||
pass_access_info.type = display_pass->type;
|
||||
|
|
|
@ -176,6 +176,9 @@ void PathTraceWorkCPU::copy_to_display(PathTraceDisplay *display,
|
|||
const KernelFilm &kfilm = device_scene_->data.film;
|
||||
|
||||
const PassAccessor::PassAccessInfo pass_access_info = get_display_pass_access_info(pass_mode);
|
||||
if (pass_access_info.type == PASS_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
const PassAccessorCPU pass_accessor(pass_access_info, kfilm.exposure, num_samples);
|
||||
|
||||
|
|
|
@ -1025,6 +1025,10 @@ void PathTraceWorkGPU::get_render_tile_film_pixels(const PassAccessor::Destinati
|
|||
const KernelFilm &kfilm = device_scene_->data.film;
|
||||
|
||||
const PassAccessor::PassAccessInfo pass_access_info = get_display_pass_access_info(pass_mode);
|
||||
if (pass_access_info.type == PASS_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
const PassAccessorGPU pass_accessor(queue_.get(), pass_access_info, kfilm.exposure, num_samples);
|
||||
|
||||
pass_accessor.get_render_tile_pixels(buffers_.get(), effective_buffer_params_, destination);
|
||||
|
|
|
@ -305,7 +305,6 @@ static void gpencil_update_geometry(bGPdata *gpd)
|
|||
LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
|
||||
if (gps->flag & GP_STROKE_TAG) {
|
||||
BKE_gpencil_stroke_geometry_update(gpd, gps);
|
||||
BKE_gpencil_tag_full_update(gpd, gpl, gpf, gps);
|
||||
gps->flag &= ~GP_STROKE_TAG;
|
||||
changed = true;
|
||||
}
|
||||
|
@ -1392,7 +1391,6 @@ static void gpencil_sculpt_brush_init_stroke(bContext *C, tGP_BrushEditData *gso
|
|||
*/
|
||||
if (blender::animrig::is_autokey_on(scene) && (gpf->framenum != cfra)) {
|
||||
BKE_gpencil_frame_addcopy(gpl, cfra);
|
||||
BKE_gpencil_tag_full_update(gpd, gpl, nullptr, nullptr);
|
||||
/* Need tag to recalculate evaluated data to avoid crashes. */
|
||||
DEG_id_tag_update(&gso->gpd->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, nullptr);
|
||||
|
@ -1760,9 +1758,6 @@ static bool gpencil_sculpt_brush_do_frame(bContext *C,
|
|||
/* Delay a full recalculation for other frames. */
|
||||
gpencil_recalc_geometry_tag(gps_active);
|
||||
}
|
||||
bGPDlayer *gpl_active = (gpl->runtime.gpl_orig) ? gpl->runtime.gpl_orig : gpl;
|
||||
bGPDframe *gpf_active = (gpf->runtime.gpf_orig) ? gpf->runtime.gpf_orig : gpf;
|
||||
BKE_gpencil_tag_full_update(gpd, gpl_active, gpf_active, gps_active);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#include "BLI_array_utils.hh"
|
||||
#include "BLI_task.hh"
|
||||
|
||||
#include "BKE_curves.hh"
|
||||
|
|
Loading…
Reference in New Issue