Skip to content

Commit

Permalink
Add seed to randy. Doc images.
Browse files Browse the repository at this point in the history
  • Loading branch information
p-groarke committed Sep 12, 2021
1 parent 5cd8f2f commit 211d09c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions SimpleOcean.osl
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ shader SimpleOcean
0.1454969690, 0.7006940519, 0.5992551756, 0.2845851767, 0.4452032488, 0.5779639096
};


// Array of waves settings.
wave_info waves[ARR_SIZE];

Expand Down Expand Up @@ -542,7 +541,7 @@ shader SimpleOcean
} else if (Randomness == "Hash 3") {
rng = noise("hash", abs_idx, abs_seed);
} else if (Randomness == "Randy Mc. Randface") {
rng = randy_mcrandface[i];
rng = randy_mcrandface[(i + Seed) % ARR_SIZE];
} else if (Randomness == "Cell 1") {
rng = noise("cell", abs_idx, abs_seed);
} else if (Randomness == "Rand 1") {
Expand Down Expand Up @@ -596,7 +595,7 @@ shader SimpleOcean
float phi = wave_phi(Speed, wlength);

// The angle is randomly rotated between the allowed range.
// The smaller the waves, the less the angle range (to reduce banding).
// The smaller the waves, the higher the angle range (to reduce banding).
float angle = Direction;
float dev_growth = 1.0 + decay_per * DeviationGrowth;
float dev = Deviation * dev_growth;
Expand Down
Binary file added doc/simpleocean_1.1_deep_turbulent.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/simpleocean_1.1_shallow_lake.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 211d09c

Please sign in to comment.