diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-08-14 21:26:21 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-08-14 22:38:13 +0300 |
commit | 485b8d41be603624fb1777495ecaaaa9d02bab4d (patch) | |
tree | 0b3a0280673916f3c7a86921f8c9735acb962ce2 /source/blender/draw/engines/workbench/workbench_materials.c | |
parent | a5d72bac8e2309470781d6a77335583bbfa0a903 (diff) |
Workbench: Add support for the xray object option
Xray object can be see through other objects. They cast shadows as well
but cannot receive then.
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_materials.c')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_materials.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c index 54e8aa1c3b3..dd5bac6a0f4 100644 --- a/source/blender/draw/engines/workbench/workbench_materials.c +++ b/source/blender/draw/engines/workbench/workbench_materials.c @@ -110,7 +110,7 @@ char *workbench_material_build_defines(WORKBENCH_PrivateData *wpd, bool use_text return str; } -uint workbench_material_get_hash(WORKBENCH_MaterialData *material_template) +uint workbench_material_get_hash(WORKBENCH_MaterialData *material_template, bool is_ghost) { uint input[4]; uint result; @@ -128,6 +128,8 @@ uint workbench_material_get_hash(WORKBENCH_MaterialData *material_template) input[3] = (uint)(material_template->roughness * 512); result += BLI_ghashutil_uinthash_v4_murmur(input); + result += BLI_ghashutil_uinthash((uint)is_ghost); + /* add texture reference */ if (material_template->ima) { result += BLI_ghashutil_inthash_p_murmur(material_template->ima); |