Blender
V5.3
source
blender
draw
engines
eevee
shaders
eevee_surfel.bsl.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
5
#pragma once
6
7
#include "
eevee_lightprobe_shared.hh
"
8
9
struct
SurfelData
{
10
[[
storage
(
SURFEL_BUF_SLOT
, read_write)]] Surfel (&
surfel_buf
)[];
11
[[
storage
(
CAPTURE_BUF_SLOT
, read)]]
const
CaptureInfoData &
capture_info_buf
;
12
17
bool
is_valid_surfel_link
(
int
a,
int
b
)
const
18
{
19
float3
link_vector =
normalize
(
surfel_buf
[
b
].
position
-
surfel_buf
[a].
position
);
20
float
link_angle_cos =
dot
(
surfel_buf
[a].normal, link_vector);
21
bool
is_coplanar =
abs
(link_angle_cos) < 0.05f;
22
return
!is_coplanar;
23
}
24
};
b
b
Definition
compositor_morphological_distance_infos.hh:36
CAPTURE_BUF_SLOT
#define CAPTURE_BUF_SLOT
Definition
eevee_defines.hh:302
SURFEL_BUF_SLOT
#define SURFEL_BUF_SLOT
Definition
eevee_defines.hh:300
eevee_lightprobe_shared.hh
storage
#define storage(slot, qualifiers)
Definition
gpu_shader_cxx_attribute.hh:119
position
#define position
Definition
gpu_shader_cxx_attribute.hh:63
normalize
VecBase< float, D > normalize(VecOp< float, D >) RET
dot
float dot(VecOp< float, D >, VecOp< float, D >) RET
abs
#define abs
Definition
gpu_shader_cxx_builtin.hh:104
blender::float3
VecBase< float, 3 > float3
Definition
BLI_math_vector_types.hh:799
SurfelData
Definition
eevee_surfel.bsl.hh:9
SurfelData::is_valid_surfel_link
bool is_valid_surfel_link(int a, int b) const
Definition
eevee_surfel.bsl.hh:17
SurfelData::capture_info_buf
const CaptureInfoData & capture_info_buf
Definition
eevee_surfel.bsl.hh:11
SurfelData::surfel_buf
Surfel(& surfel_buf)[]
Definition
eevee_surfel.bsl.hh:10
Generated on
for Blender by
doxygen
1.18.0