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.
This commit is contained in:
Jeroen Bakker
2018-06-28 09:19:00 +02:00
parent 53e191e0a5
commit 20880d8744

View File

@@ -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;
}