Blender
V5.0
source
blender
draw
engines
eevee
eevee_motion_blur_shared.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9
#pragma once
10
11
#include "
GPU_shader_shared_utils.hh
"
12
13
#ifndef GPU_SHADER
14
namespace
blender::eevee
{
15
#endif
16
17
#define MOTION_BLUR_TILE_SIZE 32
18
#define MOTION_BLUR_MAX_TILE 512
/* 16384 / MOTION_BLUR_TILE_SIZE */
19
struct
MotionBlurData
{
21
float2
target_size_inv
;
23
float2
motion_scale
;
25
float
depth_scale
;
26
27
float
_pad0
,
_pad1
,
_pad2
;
28
};
29
BLI_STATIC_ASSERT_ALIGN
(
MotionBlurData
, 16)
30
31
/* For some reasons some GLSL compilers do not like this struct.
32
* So we declare it as a uint array instead and do indexing ourselves. */
33
#ifdef __cplusplus
34
struct
MotionBlurTileIndirection {
39
uint
prev[
MOTION_BLUR_MAX_TILE
][
MOTION_BLUR_MAX_TILE
];
40
uint
next
[
MOTION_BLUR_MAX_TILE
][
MOTION_BLUR_MAX_TILE
];
41
};
42
BLI_STATIC_ASSERT_ALIGN
(MotionBlurTileIndirection, 16)
43
#endif
44
45
#ifndef GPU_SHADER
46
}
// namespace blender::eevee
47
#endif
BLI_STATIC_ASSERT_ALIGN
#define BLI_STATIC_ASSERT_ALIGN(st, align)
Definition
BLI_assert.h:86
uint
unsigned int uint
Definition
BLI_sys_types.h:64
GPU_shader_shared_utils.hh
MOTION_BLUR_MAX_TILE
#define MOTION_BLUR_MAX_TILE
Definition
eevee_motion_blur_shared.hh:18
next
static ulong * next
Definition
mathutils_noise.cc:59
blender::eevee
Definition
eevee_ambient_occlusion.cc:29
blender::float2
VecBase< float, 2 > float2
Definition
BLI_math_vector_types.hh:618
blender::eevee::MotionBlurData
Definition
eevee_motion_blur_shared.hh:19
blender::eevee::MotionBlurData::_pad2
float _pad2
Definition
eevee_motion_blur_shared.hh:27
blender::eevee::MotionBlurData::target_size_inv
float2 target_size_inv
Definition
eevee_motion_blur_shared.hh:21
blender::eevee::MotionBlurData::motion_scale
float2 motion_scale
Definition
eevee_motion_blur_shared.hh:23
blender::eevee::MotionBlurData::depth_scale
float depth_scale
Definition
eevee_motion_blur_shared.hh:25
blender::eevee::MotionBlurData::_pad1
float _pad1
Definition
eevee_motion_blur_shared.hh:27
blender::eevee::MotionBlurData::_pad0
float _pad0
Definition
eevee_motion_blur_shared.hh:27
Generated on
for Blender by
doxygen
1.16.1