Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-06-11 14:09:04 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-06-28 19:48:39 +0300
commite127182065a073235bac4158db6b6af1f36651c5 (patch)
tree01fb5e6efceb11f5e529f171ab260e931a5c788b /source/blender/draw/intern/draw_curves.cc
parent75ad435ceb63559a1443b618045e99b6ea90883f (diff)
DRW: Curve: Fix wrong UBO alignment
This was preventing correct attribute rendering with multiple attributes. Since the `CurveInfos` struct is used for data sharing between C++ and GLSL and inside a UBO it needs to obey the `std140` alignment rules which states that arrays of scalars are padded to the size of `vec4` for each array entry.
Diffstat (limited to 'source/blender/draw/intern/draw_curves.cc')
-rw-r--r--source/blender/draw/intern/draw_curves.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_curves.cc b/source/blender/draw/intern/draw_curves.cc
index d040b4eade3..246f7c843ba 100644
--- a/source/blender/draw/intern/draw_curves.cc
+++ b/source/blender/draw/intern/draw_curves.cc
@@ -385,7 +385,7 @@ DRWShadingGroup *DRW_shgroup_curves_create_sub(Object *object,
* attributes. */
const int index = attribute_index_in_material(gpu_material, request.attribute_name);
if (index != -1) {
- curves_infos.is_point_attribute[index] = request.domain == ATTR_DOMAIN_POINT;
+ curves_infos.is_point_attribute[index][0] = request.domain == ATTR_DOMAIN_POINT;
}
}