Commit: b33634f8faf34f67d93c31b3961813f910bfe986
Author: Miguel Pozo
Date: Fri Dec 30 17:22:03 2022 +0100
Branches: tmp-worbench-rewrite2-optimizations
https://developer.blender.org/rBb33634f8faf34f67d93c31b3961813f910bfe986
Optimization: Remove unused random computation
This is most likely removed in release builds, but not on debug.
===================================================================
M source/blender/draw/intern/draw_resource.hh
===================================================================
diff --git a/source/blender/draw/intern/draw_resource.hh
b/source/blender/draw/intern/draw_resource.hh
index 654caa878dd..a2de084b900 100644
--- a/source/blender/draw/intern/draw_resource.hh
+++ b/source/blender/draw/intern/draw_resource.hh
@@ -82,15 +82,6 @@ inline void ObjectInfos::sync(const blender::draw::ObjectRef
ref, bool is_active
SET_FLAG_FROM_TEST(
flag, ref.object->transflag & OB_NEG_SCALE,
eObjectInfoFlag::OBJECT_NEGATIVE_SCALE);
- if (ref.dupli_object == nullptr) {
- /* TODO(fclem): this is rather costly to do at draw time. Maybe we can
- * put it in ob->runtime and make depsgraph ensure it is up to date. */
- random = BLI_hash_int_2d(BLI_hash_string(ref.object->id.name + 2), 0) *
- (1.0f / (float)0xFFFFFFFF);
- }
- else {
- random = ref.dupli_object->random_id * (1.0f / (float)0xFFFFFFFF);
- }
/* Default values. Set if needed. */
random = 0.0f;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs