diff options
-rw-r--r-- | source/blender/gpu/intern/gpu_texture_fluid.c | 17 |
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 */ |