-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates WorleyNoise to be multi-threaded and faster (#102)
Another noise algorithm updated in my streak, this time it's worleynoise, since i didn't know jack shit and i heavily abused Rc<> to acomplish my goals it was really shit. Now it is multi-threaded, blazing fast and really sexy lookin. NOTE: this update changes ABI of worley noise slightly.
- Loading branch information
Showing
4 changed files
with
205 additions
and
169 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* This proc generates a noise grid using worley noise algorithm | ||
* | ||
* Returns a single string that goes row by row, with values of 1 representing an alive cell, and a value of 0 representing a dead cell. | ||
* | ||
* Arguments: | ||
* * region_size: The size of regions | ||
* * threshold: the value that determines wether a cell is dead or alive | ||
* * node_per_region_chance: chance of a node existiing in a region | ||
* * size: size of the returned grid | ||
* * node_min: minimum amount of nodes in a region (after the node_per_region_chance is applied) | ||
* * node_max: maximum amount of nodes in a region | ||
*/ | ||
#define rustg_worley_generate(region_size, threshold, node_per_region_chance, size, node_min, node_max) \ | ||
call(RUST_G, "worley_generate")(region_size, threshold, node_per_region_chance, size, node_min, node_max) | ||
|
Oops, something went wrong.