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/engines/eevee/shaders/shadow_vert.glsl
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/engines/eevee/shaders/shadow_vert.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/shadow_vert.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl b/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl
index 2926f8c5a89..57d70334651 100644
--- a/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl
+++ b/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl
@@ -73,7 +73,7 @@ int g_curves_attr_id = 0;
int curves_attribute_element_id()
{
int id = hairStrandID;
- if (drw_curves.is_point_attribute[g_curves_attr_id] != 0) {
+ if (drw_curves.is_point_attribute[g_curves_attr_id][0] != 0) {
id = hair_get_base_id();
}