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>2020-01-17 18:05:19 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-01-17 18:29:20 +0300
commit6eaf51ef3e5b7d37170473449bcda60bad025e67 (patch)
tree4dff167f66b8d2befe0303fff168573ad943379c /source/blender/draw/intern/draw_cache_impl_particles.c
parent9410e5dc97c4f21e19865ca8a9e1e185fcf5a1d4 (diff)
DRW: Use USHORT for vertex color and upload them in linear color to the GPU
This way we remove the need for the srgb boolean uniform and a lot of code complexity. However, mesh update is going to be a bit slower. I did not benchmark the performance impact. This also fix a typo in draw_cache_impl_particles.c and fix hair not using vertex color in workbench. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6610
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_particles.c')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_particles.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c b/source/blender/draw/intern/draw_cache_impl_particles.c
index 7de6ee2b3b1..f4057927d55 100644
--- a/source/blender/draw/intern/draw_cache_impl_particles.c
+++ b/source/blender/draw/intern/draw_cache_impl_particles.c
@@ -1199,7 +1199,7 @@ static void particle_batch_cache_ensure_pos_and_seg(PTCacheEdit *edit,
GPU_vertformat_safe_attrib_name(name, attr_safe_name, GPU_MAX_SAFE_ATTRIB_NAME);
BLI_snprintf(uuid, sizeof(uuid), "c%s", attr_safe_name);
- col_id[i] = GPU_vertformat_attr_add(&format, uuid, GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
+ col_id[i] = GPU_vertformat_attr_add(&format, uuid, GPU_COMP_U16, 4, GPU_FETCH_FLOAT);
if (i == active_col) {
GPU_vertformat_alias_add(&format, "c");