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-07-29 16:53:01 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-07-29 16:54:51 +0300
commitf0687d46650d1323778cf6d545c5cb9d25f558de (patch)
tree8347e1db9c6c0363bc7345c246488844012b632d
parent1804a6d040d2e0ababe546d1ba5d2ccb85c55903 (diff)
Cleanup: GPUTexture: Use UNPACK3 in texture_fluid
-rw-r--r--source/blender/gpu/intern/gpu_texture_fluid.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/source/blender/gpu/intern/gpu_texture_fluid.c b/source/blender/gpu/intern/gpu_texture_fluid.c
index 13273dba444..ecbf46d0ad9 100644
--- a/source/blender/gpu/intern/gpu_texture_fluid.c
+++ b/source/blender/gpu/intern/gpu_texture_fluid.c
@@ -184,7 +184,7 @@ static GPUTexture *create_field_texture(FluidDomainSettings *fds)
}
GPUTexture *tex = GPU_texture_create_nD(
- fds->res[0], fds->res[1], fds->res[2], 3, field, GPU_R8, GPU_DATA_FLOAT, 0, true, NULL);
+ UNPACK3(fds->res), 3, field, GPU_R8, GPU_DATA_FLOAT, 0, true, NULL);
swizzle_texture_channel_single(tex);
return tex;
@@ -203,7 +203,7 @@ static GPUTexture *create_density_texture(FluidDomainSettings *fds, int highres)
}
GPUTexture *tex = GPU_texture_create_nD(
- dim[0], dim[1], dim[2], 3, data, GPU_R8, GPU_DATA_FLOAT, 0, true, NULL);
+ UNPACK3(dim), 3, data, GPU_R8, GPU_DATA_FLOAT, 0, true, NULL);
swizzle_texture_channel_single(tex);
@@ -355,9 +355,7 @@ void GPU_create_smoke(FluidModifierData *fmd, int highres)
fds->tex_flame_coba = create_transfer_function(TFUNC_FLAME_SPECTRUM, NULL);
}
if (!fds->tex_shadow) {
- fds->tex_shadow = GPU_texture_create_nD(fds->res[0],
- fds->res[1],
- fds->res[2],
+ fds->tex_shadow = GPU_texture_create_nD(UNPACK3(fds->res),
3,
manta_smoke_get_shadow(fds->fluid),
GPU_R8,
@@ -387,12 +385,9 @@ void GPU_create_smoke_velocity(FluidModifierData *fmd)
}
if (!fds->tex_velocity_x) {
- fds->tex_velocity_x = GPU_texture_create_3d(
- fds->res[0], fds->res[1], fds->res[2], GPU_R16F, vel_x, NULL);
- fds->tex_velocity_y = GPU_texture_create_3d(
- fds->res[0], fds->res[1], fds->res[2], GPU_R16F, vel_y, NULL);
- fds->tex_velocity_z = GPU_texture_create_3d(
- fds->res[0], fds->res[1], fds->res[2], GPU_R16F, vel_z, NULL);
+ fds->tex_velocity_x = GPU_texture_create_3d(UNPACK3(fds->res), GPU_R16F, vel_x, NULL);
+ fds->tex_velocity_y = GPU_texture_create_3d(UNPACK3(fds->res), GPU_R16F, vel_y, NULL);
+ fds->tex_velocity_z = GPU_texture_create_3d(UNPACK3(fds->res), GPU_R16F, vel_z, NULL);
}
}
#endif /* WITH_FLUID */