Blender V5.0
types_spectrum.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#pragma once
6
7#include "util/types_float3.h"
8
10
11#define SPECTRUM_CHANNELS 3
12
15
16#define make_spectrum(f) make_float3(f)
17#define load_spectrum(f) load_float3(f)
18#define store_spectrum(s, f) store_float3(f)
19
20#define zero_spectrum zero_float3
21#define one_spectrum one_float3
22
23#define FOREACH_SPECTRUM_CHANNEL(counter) \
24 for (int counter = 0; counter < SPECTRUM_CHANNELS; counter++)
25
26#define GET_SPECTRUM_CHANNEL(v, i) (((ccl_private float *)(&(v)))[i])
27
#define CCL_NAMESPACE_END
float3 Spectrum
packed_float3 PackedSpectrum