Commit: 9d40d0ad2e0314da9d63d0129a034569b3a9a4fc
Author: Sebastián Barschkis
Date:   Fri Apr 5 23:22:53 2019 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB9d40d0ad2e0314da9d63d0129a034569b3a9a4fc

Mantaflow: Smaller update for draw engine code

Mainly adjusted some flags to work with manta

===================================================================

M       source/blender/blenkernel/BKE_smoke.h
M       source/blender/draw/engines/eevee/eevee_volumes.c
M       source/blender/draw/engines/workbench/workbench_volume.c
M       source/blender/gpu/intern/gpu_draw.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_smoke.h 
b/source/blender/blenkernel/BKE_smoke.h
index 38193bb6df4..94d0fb5a866 100644
--- a/source/blender/blenkernel/BKE_smoke.h
+++ b/source/blender/blenkernel/BKE_smoke.h
@@ -46,6 +46,4 @@ void BKE_smoke_reallocate_highres_fluid(struct 
SmokeDomainSettings *sds, int res
 float BKE_smoke_get_velocity_at(struct Object *ob, float position[3], float 
velocity[3]);
 int BKE_smoke_get_data_flags(struct SmokeDomainSettings *sds);
 
-bool BKE_smoke_show_highres(struct Scene *scene, struct SmokeDomainSettings 
*sds);
-
 #endif /* __BKE_SMOKE_H__ */
diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c 
b/source/blender/draw/engines/eevee/eevee_volumes.c
index de42d1ce34e..24142a9a703 100644
--- a/source/blender/draw/engines/eevee/eevee_volumes.c
+++ b/source/blender/draw/engines/eevee/eevee_volumes.c
@@ -554,8 +554,8 @@ void EEVEE_volumes_cache_object_add(EEVEE_ViewLayerData 
*sldata, EEVEE_Data *ved
 
                /* Constant Volume color. */
                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);
+               bool use_constant_color = ((sds->active_fields & 
FLUID_DOMAIN_ACTIVE_COLORS) == 0 &&
+                                          (sds->active_fields & 
FLUID_DOMAIN_ACTIVE_COLOR_SET) != 0);
 
                DRW_shgroup_uniform_vec3(grp, "volumeColor", 
(use_constant_color) ? sds->active_color : white, 1);
 
diff --git a/source/blender/draw/engines/workbench/workbench_volume.c 
b/source/blender/draw/engines/workbench/workbench_volume.c
index 8a28d16597e..0015cff7ba7 100644
--- a/source/blender/draw/engines/workbench/workbench_volume.c
+++ b/source/blender/draw/engines/workbench/workbench_volume.c
@@ -126,7 +126,6 @@ void workbench_volume_cache_populate(WORKBENCH_Data 
*vedata, Scene *scene, Objec
        }
 
        wpd->volumes_do = true;
-       const bool show_highres = BKE_smoke_show_highres(scene, sds);
        if (sds->use_coba) {
                GPU_create_smoke_coba_field(smd);
        }
@@ -192,8 +191,8 @@ void workbench_volume_cache_populate(WORKBENCH_Data 
*vedata, Scene *scene, Objec
        }
        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);
+               bool use_constant_color = ((sds->active_fields & 
FLUID_DOMAIN_ACTIVE_COLORS) == 0 &&
+                                          (sds->active_fields & 
FLUID_DOMAIN_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);
diff --git a/source/blender/gpu/intern/gpu_draw.c 
b/source/blender/gpu/intern/gpu_draw.c
index 0bd8a953388..9f6222c72aa 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -974,7 +974,7 @@ static GPUTexture *create_flame_texture(SmokeDomainSettings 
*sds, int highres)
 {
        float *source = NULL;
        const bool has_fuel = (highres) ? smoke_turbulence_has_fuel(sds->fluid) 
: smoke_has_fuel(sds->fluid);
-       int *dim = sds->res;
+       int *dim = (highres) ? sds->res_noise : sds->res;
 
        if (!has_fuel)
                return NULL;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to