diff options
author | Clay John <claynjohn@gmail.com> | 2022-10-11 12:24:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 12:24:48 -0700 |
commit | 18d2035a3dec470cf99a1413d243a93547cbb123 (patch) | |
tree | 41da7838c102a7a032ce389eeaf71de6720c408d /servers/rendering/renderer_rd | |
parent | 6da55cd94b7d7787dac4a7b19ce5637496f15d34 (diff) | |
parent | 816600382e92a4efb8dad715cf98e9d170f4e29a (diff) |
Merge pull request #67110 from Chaosus/fix_incorrect_vec3_ubo_fill
Fix incorrect offset for vec3 datatypes in `_fill_std140_ubo_empty`
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/material_storage.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp index 1fecac9045..f0b8d006cb 100644 --- a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp @@ -903,7 +903,9 @@ _FORCE_INLINE_ static void _fill_std140_ubo_empty(ShaderLanguage::DataType type, case ShaderLanguage::TYPE_BVEC3: case ShaderLanguage::TYPE_IVEC3: case ShaderLanguage::TYPE_UVEC3: - case ShaderLanguage::TYPE_VEC3: + case ShaderLanguage::TYPE_VEC3: { + memset(data, 0, 12 * p_array_size); + } break; case ShaderLanguage::TYPE_BVEC4: case ShaderLanguage::TYPE_IVEC4: case ShaderLanguage::TYPE_UVEC4: |