Last active
August 20, 2021 22:42
-
-
Save jamesrobinsonvfx/39907b3977f2f020843da6bc97c57417 to your computer and use it in GitHub Desktop.
Pick a random value of a bitmask per point
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int num_choices = 5; | |
int idx = floor(rand(i@id + 65536) * num_choices); | |
i@bitmask = int(pow(2, idx)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment