Skip to content

Instantly share code, notes, and snippets.

vector custom_random(vector Seed, vector Pixelator, float RandomSeed, float Division) {
return hashnoise(Pixelator * 2343249.2 + Seed * RandomSeed);
}
float count_treshold(float RandomizedCount, float Count) {
float Mix = Count < 0 ? (1 - RandomizedCount) : RandomizedCount;
return Mix < abs(Count);
}
float clipping_mask(vector Vector, float CountTreshold) {
vector custom_random(vector Seed, vector Pixelator, float RandomSeed, float Division) {
return hashnoise(Pixelator * 2343249.2 + Seed * RandomSeed);
}
float count_treshold(float RandomizedCount, float Count) {
float Mix = Count < 0 ? (1 - RandomizedCount) : RandomizedCount;
return Mix < abs(Count);
}
float clipping_mask(vector Vector, float CountTreshold) {
vector sawtooth(vector Input, vector DividedScale, vector DividedOffset) {
vector Offseted = Input - DividedOffset;
vector Absolute = abs(Offseted);
vector Normalized = Offseted / Absolute;
vector Squared = Normalized * Offseted;
vector Modulo = fmod(Squared, DividedScale) / DividedScale;
vector Inverted = 1 - Modulo;
return 1 - ((1 - Normalized) * Modulo + Normalized * Inverted);
}
### Keybase proof
I hereby claim:
* I am szaq on github.
* I am szaq (https://keybase.io/szaq) on keybase.
* I have a public key ASCIztc7STffiq5eXbkxR8V_xbm08pKwEKzXMtiCJ6gUmgo
To claim this, I am signing this object: