diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-06-11 14:09:04 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-06-28 19:48:39 +0300 |
commit | e127182065a073235bac4158db6b6af1f36651c5 (patch) | |
tree | 01fb5e6efceb11f5e529f171ab260e931a5c788b /source/blender/draw/engines/eevee_next | |
parent | 75ad435ceb63559a1443b618045e99b6ea90883f (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/engines/eevee_next')
-rw-r--r-- | source/blender/draw/engines/eevee_next/shaders/eevee_attributes_lib.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_attributes_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_attributes_lib.glsl index a65bb7decb6..326481a1db6 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_attributes_lib.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_attributes_lib.glsl @@ -131,7 +131,7 @@ int g_curves_attr_id = 0; int curves_attribute_element_id() { int id = interp.curves_strand_id; - if (drw_curves.is_point_attribute[g_curves_attr_id] != 0) { + if (drw_curves.is_point_attribute[g_curves_attr_id][0] != 0) { # ifdef COMMON_HAIR_LIB id = hair_get_base_id(); # endif |