Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_resource.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_resource.hh b/source/blender/draw/intern/draw_resource.hh
index 22ee43592a9..2df38e32ed2 100644
--- a/source/blender/draw/intern/draw_resource.hh
+++ b/source/blender/draw/intern/draw_resource.hh
@@ -85,10 +85,11 @@ inline void ObjectInfos::sync(const blender::draw::ObjectRef ref, bool is_active
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 / 0xFFFFFFFF);
+ 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 / 0xFFFFFFFF);
+ random = ref.dupli_object->random_id * (1.0f / (float)0xFFFFFFFF);
}
/* Default values. Set if needed. */
random = 0.0f;