Cycles: change Index output of Hair and Particle Info to Random, in 0..1 range.
These are used for randomization, so it's convenient if the index is already hashed and consistent with the Object Info node.
This commit is contained in:
@@ -63,4 +63,9 @@ BLI_INLINE unsigned int BLI_hash_int(unsigned int k)
|
||||
return BLI_hash_int_2d(k, 0);
|
||||
}
|
||||
|
||||
BLI_INLINE float BLI_hash_int_01(unsigned int k)
|
||||
{
|
||||
return (float)BLI_hash_int(k) * (1.0f/(float)0xFFFFFFFF);
|
||||
}
|
||||
|
||||
#endif // __BLI_HASH_H__
|
||||
|
Reference in New Issue
Block a user