Blender
V5.3
source
blender
draw
engines
eevee
eevee_motion_blur.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2022 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
42
43
#pragma once
44
45
#include "
DRW_gpu_wrapper.hh
"
46
47
#include "
eevee_motion_blur_shared.hh
"
48
#include "
eevee_sampling.hh
"
49
50
#include "
draw_pass.hh
"
51
52
namespace
blender::eevee
{
53
54
using namespace
draw;
55
56
/* -------------------------------------------------------------------- */
60
61
using
MotionBlurDataBuf
=
draw::UniformBuffer<MotionBlurData>
;
62
using
MotionBlurTileIndirectionBuf
=
draw::StorageBuffer<MotionBlurTileIndirection, true>
;
63
68
class
MotionBlurModule
{
69
private
:
70
Instance
&inst_;
71
76
Vector<float>
time_steps_;
77
79
int
initial_frame_;
80
float
initial_subframe_;
82
float
frame_time_;
84
int
shutter_position_;
86
float
shutter_time_;
87
89
bool
enabled_ =
false
;
91
bool
motion_blur_fx_enabled_ =
false
;
93
bool
was_navigating_ =
false
;
94
95
int
step_id_ = 0;
96
98
TextureFromPool
tiles_tx_;
99
100
gpu::Texture
*input_color_tx_ =
nullptr
;
101
gpu::Texture
*output_color_tx_ =
nullptr
;
102
103
PassSimple
motion_blur_ps_ = {
"MotionBlur"
};
104
105
MotionBlurTileIndirectionBuf
tile_indirection_buf_;
106
MotionBlurDataBuf
data_;
108
int3
dispatch_flatten_size_ =
int3
(0);
109
int3
dispatch_dilate_size_ =
int3
(0);
110
int3
dispatch_gather_size_ =
int3
(0);
111
112
public
:
113
MotionBlurModule
(
Instance
&inst) : inst_(inst) {};
114
~MotionBlurModule
() {};
115
116
void
init
();
117
118
/* Runs after rendering a sample. */
119
void
step
();
120
121
void
sync
();
122
123
bool
postfx_enabled
()
const
124
{
125
return
motion_blur_fx_enabled_;
126
}
127
128
void
render
(
View
&view,
gpu::Texture
**input_tx,
gpu::Texture
**output_tx);
129
130
private
:
131
float
shutter_time_to_scene_time(
float
time);
132
};
133
135
136
}
// namespace blender::eevee
DRW_gpu_wrapper.hh
blender::Vector
Definition
BLI_vector.hh:76
blender::draw::StorageBuffer
Definition
DRW_gpu_wrapper.hh:500
blender::draw::TextureFromPool
Definition
DRW_gpu_wrapper.hh:1069
blender::draw::UniformBuffer
Definition
DRW_gpu_wrapper.hh:305
blender::draw::View
Definition
draw_view.hh:37
blender::eevee::Instance
A running instance of the engine.
Definition
eevee_instance.hh:94
blender::eevee::MotionBlurModule::postfx_enabled
bool postfx_enabled() const
Definition
eevee_motion_blur.hh:123
blender::eevee::MotionBlurModule::sync
void sync()
Definition
eevee_motion_blur.cc:129
blender::eevee::MotionBlurModule::~MotionBlurModule
~MotionBlurModule()
Definition
eevee_motion_blur.hh:114
blender::eevee::MotionBlurModule::MotionBlurModule
MotionBlurModule(Instance &inst)
Definition
eevee_motion_blur.hh:113
blender::gpu::Texture
Definition
gpu_texture_private.hh:105
draw_pass.hh
eevee_motion_blur_shared.hh
eevee_sampling.hh
step
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
blender::bke::subdiv::init
void init()
Definition
subdiv.cc:35
blender::draw::PassSimple
detail::Pass< command::DrawCommandBuf > PassSimple
Definition
draw_manager.hh:52
blender::eevee
Definition
eevee_ambient_occlusion.cc:29
blender::eevee::MotionBlurDataBuf
draw::UniformBuffer< MotionBlurData > MotionBlurDataBuf
Definition
eevee_motion_blur.hh:61
blender::eevee::MotionBlurTileIndirectionBuf
draw::StorageBuffer< MotionBlurTileIndirection, true > MotionBlurTileIndirectionBuf
Definition
eevee_motion_blur.hh:62
blender::render
Definition
render/hydra/camera.cc:16
blender::int3
VecBase< int32_t, 3 > int3
Definition
BLI_math_vector_types.hh:782
Generated on
for Blender by
doxygen
1.18.0