diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-28 10:19:00 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-28 10:20:46 +0300 |
commit | 20880d87441a9e23bcf458976dd83cdee10c0166 (patch) | |
tree | e98566dd87356503dd2d40e8c039932189b78d2a /source/blender/draw/engines/workbench/workbench_materials.c | |
parent | 53e191e0a5e229dfff7a8bb1ac18e8dbd5120b31 (diff) |
Workbench: Fix Texture drawing
textures were not always drawn as the material did not always include
the image in the hash. Not sure if this will solve all cases, but it
definitely works better with this change.
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_materials.c')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_materials.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c index 76599fdce99..9fdafc87fa4 100644 --- a/source/blender/draw/engines/workbench/workbench_materials.c +++ b/source/blender/draw/engines/workbench/workbench_materials.c @@ -123,10 +123,9 @@ uint workbench_material_get_hash(WORKBENCH_MaterialData *material_template) input[3] = (uint)(material_template->material_data.roughness * 512); result += BLI_ghashutil_uinthash_v4_murmur(input); - if (material_template->color_type == V3D_SHADING_TEXTURE_COLOR) { - /* add texture reference */ - result += BLI_ghashutil_inthash_p_murmur(material_template->ima); - } + /* add texture reference */ + result += BLI_ghashutil_inthash_p_murmur(material_template->ima); + return result; } |