[Bf-blender-cvs] [20880d87441] blender2.8: Workbench: Fix Texture drawing

Jeroen Bakker noreply at git.blender.org
Thu Jun 28 09:29:02 CEST 2018


Commit: 20880d87441a9e23bcf458976dd83cdee10c0166
Author: Jeroen Bakker
Date:   Thu Jun 28 09:19:00 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB20880d87441a9e23bcf458976dd83cdee10c0166

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.

===================================================================

M	source/blender/draw/engines/workbench/workbench_materials.c

===================================================================

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



More information about the Bf-blender-cvs mailing list