diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-07-29 12:03:21 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-07-29 12:22:35 +0300 |
commit | 91150c9ef5aad3a21dd9f7c9d28223b2c1ed5a14 (patch) | |
tree | adf53c9540dc967bd3539862cb1924ce0822880f | |
parent | 659db0592d22d970baab54eaadc2975ca51d1603 (diff) |
Workbench/Eeevee: Minor refactor in smoke draw function
More concise this way.
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_volumes.c | 7 | ||||
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_volume.c | 7 |
2 files changed, 3 insertions, 11 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c index 300022e97a9..6d964806894 100644 --- a/source/blender/draw/engines/eevee/eevee_volumes.c +++ b/source/blender/draw/engines/eevee/eevee_volumes.c @@ -504,12 +504,7 @@ static bool eevee_volume_object_mesh_init(Scene *scene, #endif if (fds->fluid && (fds->type == FLUID_DOMAIN_TYPE_GAS) /* && show_smoke */) { - if (!(fds->flags & FLUID_DOMAIN_USE_NOISE)) { - GPU_create_smoke(fmd, 0); - } - else if (fds->flags & FLUID_DOMAIN_USE_NOISE) { - GPU_create_smoke(fmd, 1); - } + GPU_create_smoke(fmd, fds->flags & FLUID_DOMAIN_USE_NOISE); BLI_addtail(&e_data.smoke_domains, BLI_genericNodeN(fmd)); } diff --git a/source/blender/draw/engines/workbench/workbench_volume.c b/source/blender/draw/engines/workbench/workbench_volume.c index 8e345f8275b..20d231a14a0 100644 --- a/source/blender/draw/engines/workbench/workbench_volume.c +++ b/source/blender/draw/engines/workbench/workbench_volume.c @@ -81,11 +81,8 @@ static void workbench_volume_modifier_cache_populate(WORKBENCH_Data *vedata, if (fds->use_coba) { GPU_create_smoke_coba_field(fmd); } - else if (!(fds->flags & FLUID_DOMAIN_USE_NOISE)) { - GPU_create_smoke(fmd, 0); - } - else if (fds->flags & FLUID_DOMAIN_USE_NOISE) { - GPU_create_smoke(fmd, 1); + else { + GPU_create_smoke(fmd, fds->flags & FLUID_DOMAIN_USE_NOISE); } if ((!fds->use_coba && (fds->tex_density == NULL && fds->tex_color == NULL)) || |