diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-03-14 00:35:54 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-03-14 01:15:11 +0300 |
commit | d0fb0d0a9d0d698a499d7e38943696a43a7e456e (patch) | |
tree | 22a118d2b1858da9228baad4161d46c0a9175a5e /source/blender/draw/engines/workbench/workbench_volume.c | |
parent | bbc3ee09e44bfaba1ca2d4ab6a6bf2a51976cdae (diff) |
Fix T60170: Eevee: smoke color does not apply permanently
This was because color is not present in the density texture if there is
only one constant color. Adding it as a uniform.
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_volume.c')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_volume.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_volume.c b/source/blender/draw/engines/workbench/workbench_volume.c index fa5ed3408d6..90d68cebe24 100644 --- a/source/blender/draw/engines/workbench/workbench_volume.c +++ b/source/blender/draw/engines/workbench/workbench_volume.c @@ -191,10 +191,14 @@ void workbench_volume_cache_populate(WORKBENCH_Data *vedata, Scene *scene, Objec DRW_shgroup_uniform_texture(grp, "transferTexture", sds->tex_coba); } else { + static float white[3] = {1.0f, 1.0f, 1.0f}; + bool use_constant_color = ((sds->active_fields & SM_ACTIVE_COLORS) == 0 && + (sds->active_fields & SM_ACTIVE_COLOR_SET) != 0); DRW_shgroup_uniform_texture(grp, "densityTexture", sds->tex); DRW_shgroup_uniform_texture(grp, "shadowTexture", sds->tex_shadow); DRW_shgroup_uniform_texture(grp, "flameTexture", (sds->tex_flame) ? sds->tex_flame : e_data.dummy_tex); DRW_shgroup_uniform_texture(grp, "flameColorTexture", (sds->tex_flame) ? sds->tex_flame_coba : e_data.dummy_coba_tex); + DRW_shgroup_uniform_vec3(grp, "activeColor", (use_constant_color) ? sds->active_color : white, 1); } DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &dtxl->depth); DRW_shgroup_uniform_float_copy(grp, "densityScale", 10.0f * sds->display_thickness); |