Blender V5.0
draw_attribute_shader_shared.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#ifndef GPU_SHADER
9#endif
10
11/* Copy of DNA enum in `DNA_curves_types.h`. */
18
19/* -------------------------------------------------------------------- */
26
28 float x;
29 float y;
30 float z;
31 float w;
32};
33
35 float x;
36 float y;
37 float z;
38};
39
41 float x;
42 float y;
43};
44
46 float x;
47};
48
50{
51 return float4(data.x, data.y, data.z, data.w);
52}
53
55{
56 return float3(data.x, data.y, data.z);
57}
58
60{
61 return float2(data.x, data.y);
62}
63
65{
66 return float(data.x);
67}
68
70{
72 data.x = interp.x;
73 data.y = interp.y;
74 data.z = interp.z;
75 data.w = interp.w;
76 return data;
77}
78
80{
82 data.x = interp.x;
83 data.y = interp.y;
84 data.z = interp.z;
85 return data;
86}
87
89{
91 data.x = interp.x;
92 data.y = interp.y;
93 return data;
94}
95
97{
99 data.x = interp;
100 return data;
101}
102
BMesh const char void * data
nullptr float
StoredFloat4 as_data(float4 interp)
float4 load_data(StoredFloat4 data)
ccl_device_inline float interp(const float a, const float b, const float t)
Definition math_base.h:502
VecBase< float, 4 > float4
VecBase< float, 2 > float2
VecBase< float, 3 > float3