From c8acb6dd6c58c6a85ab18d26f02973437cb2f700 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 11 Mar 2020 13:56:28 +0100 Subject: Smoke: put density/color in separate textures, fixes for workbench shader This is more in line with standard grids and means we don't have to make many special exceptions in the upcoming change for arbitrary number of volume grids support in Eevee. The workbench shader was also changed to fix bugs where squared density was used, and the smoke color would affect the density so that black smoke would be invisible. This can change the look of smoke in workbench significantly. When using the color grid when smoke has a constant color, the color grid will no longer be premultiplied by the density. If the color is constant we want to be able not to store a grid at all. This breaks one test for Cycles and Eevee, but the setup in that test using a color without density does not make sense. It suffers from artifacts since the unpremultiplied color grid by itself will not have smooth boundaries. Differential Revision: https://developer.blender.org/D6951 --- source/blender/blenloader/intern/readfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d3f41945553..f73dc9a5466 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5439,7 +5439,8 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb, Object *ob) mmd->domain->fluid = NULL; mmd->domain->fluid_mutex = BLI_rw_mutex_alloc(); - mmd->domain->tex = NULL; + mmd->domain->tex_density = NULL; + mmd->domain->tex_color = NULL; mmd->domain->tex_shadow = NULL; mmd->domain->tex_flame = NULL; mmd->domain->tex_flame_coba = NULL; -- cgit v1.2.3