diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-05-02 16:36:09 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-05-02 17:45:08 +0300 |
commit | a2b05accea6e2879832ae4ac4465ca11d49622c5 (patch) | |
tree | 55f92258fd9e16d4081c480b7f6ece31d3cd9083 /source/blender/draw/intern/draw_cache_impl.h | |
parent | 648de1be52d0d205c657a130f462882c4d54b296 (diff) |
Eevee: Fix vertex color being in srgb space.
Now they are properly converted to Linear space before interpolation.
Since the only way to get vertex color in eevee and cycles is via the
attribute node with the CD_AUTO_FROM_NAME flag, we have to know at binding
time which type of buffer will be connected to this auto input.
We store this information inside the batch cache (together with the according
uniform name) and pass it as uniform to the shader which does conversion if
needed. The same shader can then be reused to draw another mesh with
different auto layers configuration.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl.h')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h index 83cc87307b5..cfc57dd6e40 100644 --- a/source/blender/draw/intern/draw_cache_impl.h +++ b/source/blender/draw/intern/draw_cache_impl.h @@ -91,7 +91,8 @@ struct Gwn_Batch *DRW_lattice_batch_cache_get_overlay_verts(struct Lattice *lt); /* Mesh */ struct Gwn_Batch **DRW_mesh_batch_cache_get_surface_shaded( - struct Mesh *me, struct GPUMaterial **gpumat_array, uint gpumat_array_len); + struct Mesh *me, struct GPUMaterial **gpumat_array, uint gpumat_array_len, + char **auto_layer_names, int **auto_layer_is_srgb, int *auto_layer_count); struct Gwn_Batch **DRW_mesh_batch_cache_get_surface_texpaint(struct Mesh *me); struct Gwn_Batch *DRW_mesh_batch_cache_get_surface_texpaint_single(struct Mesh *me); struct Gwn_Batch *DRW_mesh_batch_cache_get_weight_overlay_edges(struct Mesh *me, bool use_wire, bool use_sel); |