blender/intern/cycles/util/math.h
Sergey Sharybin 79d6d1659c Cycles: Add spherical harmonics attribute
Includes possibility of adding spherical harmonics on geometry, as well
as includes spherical harmonics evaluation.

Spherical harmonics are stored quantized to 8 bit integer, and always
use degree 3. The reason for the limited degree is the memory: degree
3 requires relatively small amount of coefficients (45 int8_t, which
is similar to how realtime renderers pack them into float3x4). Going
higher dimension adds a lot more coefficients to store, and so far it
doesn't seem there are gsplat data-sets that are trained to a degree
higher than 3.

The attribute is currently unused. It is preparation work foe the
gsplat project to make reviews easier.

Ref #159470

Pull Request: https://projects.blender.org/blender/blender/pulls/163409
2026-09-02 16:43:18 +02:00

30 lines
929 B
C

/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
*
* SPDX-License-Identifier: Apache-2.0 */
#pragma once
#include "util/types.h" // IWYU pragma: export
#include "util/math_base.h" // IWYU pragma: export
#include "util/math_int2.h" // IWYU pragma: export
#include "util/math_int3.h" // IWYU pragma: export
#include "util/math_int4.h" // IWYU pragma: export
#include "util/math_int8.h" // IWYU pragma: export
#include "util/math_float2.h" // IWYU pragma: export
#include "util/math_float4.h" // IWYU pragma: export
#include "util/math_float8.h" // IWYU pragma: export
#include "util/math_float3.h" // IWYU pragma: export
#include "util/math_dual.h" // IWYU pragma: export
#include "util/rect.h" // IWYU pragma: export
#include "util/math_quaternion.h" // IWYU pragma: export
#include "util/math_float3x3.h" // IWYU pragma: export
#include "util/math_spherical_harmonics.h" // IWYU pragma: export