-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add 'mx' prefixes to OSL helper functions. - Remove outdated OSL helper functions. - Minor improvements to code style.
- Loading branch information
1 parent
cf0ff3c
commit e610f4e
Showing
25 changed files
with
120 additions
and
558 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_fractal3d_color3(vector amplitude, int octaves, float lacunarity, float diminish, vector position, output color result) | ||
{ | ||
color f = fBm(position, octaves, lacunarity, diminish, "snoise"); | ||
color f = mx_fbm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * amplitude; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_fractal3d_color4(vector4 amplitude, int octaves, float lacunarity, float diminish, vector position, output color4 result) | ||
{ | ||
color4 f = fBm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * combine(amplitude.x, amplitude.y, amplitude.z, amplitude.w); | ||
color4 f = mx_fbm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * mx_combine(amplitude.x, amplitude.y, amplitude.z, amplitude.w); | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_fractal3d_fa_color3(float amplitude, int octaves, float lacunarity, float diminish, vector position, output color result) | ||
{ | ||
color f = fBm(position, octaves, lacunarity, diminish, "snoise"); | ||
color f = mx_fbm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * amplitude; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_fractal3d_fa_color4(float amplitude, int octaves, float lacunarity, float diminish, vector position, output color4 result) | ||
{ | ||
color4 f = fBm(position, octaves, lacunarity, diminish, "snoise"); | ||
color4 f = mx_fbm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * amplitude; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_fractal3d_fa_vector2(float amplitude, int octaves, float lacunarity, float diminish, vector position, output vector2 result) | ||
{ | ||
vector2 f = fBm(position, octaves, lacunarity, diminish, "snoise"); | ||
vector2 f = mx_fbm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * amplitude; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_fractal3d_fa_vector3(float amplitude, int octaves, float lacunarity, float diminish, vector position, output vector result) | ||
{ | ||
vector f = fBm(position, octaves, lacunarity, diminish, "snoise"); | ||
vector f = mx_fbm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * amplitude; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_fractal3d_fa_vector4(float amplitude, int octaves, float lacunarity, float diminish, vector position, output vector4 result) | ||
{ | ||
vector4 f = fBm(position, octaves, lacunarity, diminish, "snoise"); | ||
vector4 f = mx_fbm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * amplitude; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_fractal3d_float(float amplitude, int octaves, float lacunarity, float diminish, vector position, output float result) | ||
{ | ||
float f = fBm(position, octaves, lacunarity, diminish, "snoise"); | ||
float f = mx_fbm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * amplitude; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_fractal3d_vector2(vector2 amplitude, int octaves, float lacunarity, float diminish, vector position, output vector2 result) | ||
{ | ||
vector2 f = fBm(position, octaves, lacunarity, diminish, "snoise"); | ||
vector2 f = mx_fbm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * amplitude; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_fractal3d_vector3(vector amplitude, int octaves, float lacunarity, float diminish, vector position, output vector result) | ||
{ | ||
vector f = fBm(position, octaves, lacunarity, diminish, "snoise"); | ||
vector f = mx_fbm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * amplitude; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_fractal3d_vector4(vector4 amplitude, int octaves, float lacunarity, float diminish, vector position, output vector4 result) | ||
{ | ||
vector4 f = fBm(position, octaves, lacunarity, diminish, "snoise"); | ||
vector4 f = mx_fbm(position, octaves, lacunarity, diminish, "snoise"); | ||
result = f * amplitude; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise2d_color4(vector4 amplitude, float pivot, vector2 texcoord, output color4 result) | ||
{ | ||
color4 value = noise("snoise", texcoord.x, texcoord.y); | ||
color4 value = mx_noise("snoise", texcoord.x, texcoord.y); | ||
result = value * color4(color(amplitude.x, amplitude.y, amplitude.z), amplitude.w) + pivot; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise2d_fa_color4(float amplitude, float pivot, vector2 texcoord, output color4 result) | ||
{ | ||
color4 value = noise("snoise", texcoord.x, texcoord.y); | ||
color4 value = mx_noise("snoise", texcoord.x, texcoord.y); | ||
result = value * amplitude + pivot; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise2d_fa_vector2(float amplitude, float pivot, vector2 texcoord, output vector2 result) | ||
{ | ||
vector2 value = noise("snoise", texcoord.x, texcoord.y); | ||
vector2 value = mx_noise("snoise", texcoord.x, texcoord.y); | ||
result = value * amplitude + pivot; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise2d_fa_vector4(float amplitude, float pivot, vector2 texcoord, output vector4 result) | ||
{ | ||
vector4 value = noise("snoise", texcoord.x, texcoord.y); | ||
vector4 value = mx_noise("snoise", texcoord.x, texcoord.y); | ||
result = value * amplitude + pivot; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise2d_vector2(vector2 amplitude, float pivot, vector2 texcoord, output vector2 result) | ||
{ | ||
vector2 value = noise("snoise", texcoord.x, texcoord.y); | ||
vector2 value = mx_noise("snoise", texcoord.x, texcoord.y); | ||
result = value * amplitude + pivot; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise2d_vector4(vector4 amplitude, float pivot, vector2 texcoord, output vector4 result) | ||
{ | ||
vector4 value = noise("snoise", texcoord.x, texcoord.y); | ||
vector4 value = mx_noise("snoise", texcoord.x, texcoord.y); | ||
result = value * amplitude + pivot; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise3d_color4(vector4 amplitude, float pivot, vector position, output color4 result) | ||
{ | ||
color4 value = noise("snoise", position); | ||
result = value * combine(amplitude.x, amplitude.y, amplitude.z, amplitude.w) + pivot; | ||
color4 value = mx_noise("snoise", position); | ||
result = value * mx_combine(amplitude.x, amplitude.y, amplitude.z, amplitude.w) + pivot; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise3d_fa_color4(float amplitude, float pivot, vector position, output color4 result) | ||
{ | ||
color4 value = noise("snoise", position); | ||
color4 value = mx_noise("snoise", position); | ||
result = value * amplitude + pivot; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise3d_fa_vector2(float amplitude, float pivot, vector position, output vector2 result) | ||
{ | ||
vector2 value = noise("snoise", position); | ||
vector2 value = mx_noise("snoise", position); | ||
result = value * amplitude + pivot; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise3d_fa_vector4(float amplitude, float pivot, vector position, output vector4 result) | ||
{ | ||
vector4 value = noise("snoise", position); | ||
vector4 value = mx_noise("snoise", position); | ||
result = value * amplitude + pivot; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise3d_vector2(vector2 amplitude, float pivot, vector position, output vector2 result) | ||
{ | ||
vector2 value = noise("snoise", position); | ||
vector2 value = mx_noise("snoise", position); | ||
result = value * amplitude + pivot; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
void mx_noise3d_vector4(vector4 amplitude, float pivot, vector position, output vector4 result) | ||
{ | ||
vector4 value = noise("snoise", position); | ||
vector4 value = mx_noise("snoise", position); | ||
result = value * amplitude + pivot; | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
remap({{in}}, {{inlow}}, {{inhigh}}, {{outlow}}, {{outhigh}}, 0) | ||
mx_remap({{in}}, {{inlow}}, {{inhigh}}, {{outlow}}, {{outhigh}}, 0) |