Blender V5.3
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
8
9struct 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 {
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};
#define CAPTURE_BUF_SLOT
#define SURFEL_BUF_SLOT
#define storage(slot, qualifiers)
#define position
VecBase< float, D > normalize(VecOp< float, D >) RET
float dot(VecOp< float, D >, VecOp< float, D >) RET
#define abs
VecBase< float, 3 > float3
bool is_valid_surfel_link(int a, int b) const
const CaptureInfoData & capture_info_buf
Surfel(& surfel_buf)[]