diff options
author | Thomas Dinges <blender@dingto.org> | 2012-06-03 01:04:16 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2012-06-03 01:04:16 +0400 |
commit | 298d311bd665a905c2c3095a70a29c07e2fc5506 (patch) | |
tree | 36d91940547a4eb4dd6ef99d5b5a13520a4f21d9 /intern | |
parent | 64039bdf44c5c920973915e333de2bcd1c861a8d (diff) |
Cycles / Object Info Node:
* The random output had a range from -0.5 to 0.5, added an offset of 0.5 to bring it into the 0.0 / 1.0 range, which is in alignment with Shader Node Guidelines.
Patch by Agustin Benavidez, thanks!
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/object.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp index 5c7e48a38eb..ad0bae83c21 100644 --- a/intern/cycles/render/object.cpp +++ b/intern/cycles/render/object.cpp @@ -164,7 +164,7 @@ void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene float uniform_scale; float surface_area = 0.0f; float pass_id = ob->pass_id; - float random_number = (float)ob->random_id * (1.0f/(float)0xFFFFFFFF); + float random_number = (float)ob->random_id * (1.0f/(float)0xFFFFFFFF)+0.5f; if(transform_uniform_scale(tfm, uniform_scale)) { map<Mesh*, float>::iterator it = surface_area_map.find(mesh); |