diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-21 21:04:09 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-21 21:04:09 +0300 |
commit | 133dfdd704b6a2a4d46337696773b331a44304ea (patch) | |
tree | e7465681db5a8783614fa2617ecb2455f1bef623 /intern/cycles/blender/blender_object.cpp | |
parent | 7f4a2fc437cf9a6decbda152bd7d36ce7a08929f (diff) |
Shading: Add White Noise node.
The White Noise node hashes the input and returns a random number in the
range [0, 1]. The input can be a 1D, 2D, 3D, or a 4D vector.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5550
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 7ccf8226e5b..ab47da9c1a2 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -217,7 +217,7 @@ void BlenderSync::sync_light(BL::Object &b_parent, light->random_id = random_id; } else { - light->random_id = hash_int_2d(hash_string(b_ob.name().c_str()), 0); + light->random_id = hash_uint2(hash_string(b_ob.name().c_str()), 0); } if (light->type == LIGHT_AREA) @@ -490,7 +490,7 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph, else { object->dupli_generated = make_float3(0.0f, 0.0f, 0.0f); object->dupli_uv = make_float2(0.0f, 0.0f); - object->random_id = hash_int_2d(hash_string(object->name.c_str()), 0); + object->random_id = hash_uint2(hash_string(object->name.c_str()), 0); } object->tag_update(scene); |