-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1188 from t3kt/0.39
0.39
- Loading branch information
Showing
753 changed files
with
4,596 additions
and
2,271 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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,58 @@ | ||
// @Scale {"default":1, "normMin":0, "normMax":2} | ||
// @Offset {"style": "XYZ"} | ||
// @Offset2 {"style": "XYZ"} | ||
// @Rot {"style": "XYZ"} | ||
// @Qube {"default":1, "normMin":0, "normMax":2} | ||
// @Iterations {"style": "Int", "default":1, "normMin":0, "normMax":10} | ||
|
||
/////////////////////////////////////////////////////////////////////////////////////// | ||
// Fractal Qube Ported from Fragmentarium 'BioCube' example by Darkbeam | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
float fFractalQube(vec3 p, float Scale, vec3 Offset, vec3 Offset2, vec3 Rot, float Qube, int Iterations) | ||
{ | ||
mat3 fracRotation1 = Scale * rotateMatrix(Rot); | ||
float t; | ||
int n = 0; | ||
float scalep = 1; | ||
vec3 z0 = p; | ||
p = abs(p); | ||
//z -= (1,1,1); | ||
if (p.y>p.x) p.xy = p.yx; | ||
if (p.z>p.x) p.xz = p.zx; | ||
if (p.y>p.x) p.xy = p.yx; | ||
float d = 1.0- p.x; | ||
p = z0; | ||
// Folds. | ||
//Dodecahedral | ||
while (n < Iterations) | ||
{ | ||
p *= fracRotation1; | ||
p = abs(p); | ||
p -= Offset; | ||
if (p.y>p.x) p.xy = p.yx; | ||
if (p.z>p.x) p.xz = p.zx; | ||
if (p.y>p.x) p.xy = p.yx; | ||
p -= Offset2; | ||
if (p.y>p.x) p.xy = p.yx; | ||
if (p.z>p.x) p.xz = p.zx; | ||
if (p.y>p.x) p.xy = p.yx; | ||
|
||
n++; scalep *= Scale; | ||
d = abs(min(Qube/n-d, (+p.x)/scalep)); | ||
} | ||
return d; | ||
} | ||
|
||
|
||
ReturnT thismap(CoordT p, ContextT ctx) { | ||
float scale = THIS_Scale; | ||
vec3 offset = THIS_Offset; | ||
vec3 offset2 = THIS_Offset2; | ||
vec3 rot = radians(THIS_Rot); | ||
float qube = THIS_Qube; | ||
int iterations = int(THIS_Iterations); | ||
|
||
float d = fFractalQube(p, scale, offset, offset2, rot, qube, iterations); | ||
return createSdf(d); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Binary file not shown.
Binary file not shown.
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 @@ | ||
toolkitVersion: '0.38' | ||
toolkitVersion: '0.39' |
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,8 +1,8 @@ | ||
{% case include.handling %} | ||
{% when "runtime" %} | ||
<span title="Can change efficiently">Runtime</span> | ||
{% when "macro" %} | ||
{% when "baked" %} | ||
<span title="Causes a recompile when changed">Baked</span> | ||
{% when "constant" %} | ||
{% when "semibaked" %} | ||
<span title="Might cause a partial recompile when changed">Semi-Baked</span> | ||
{% endcase %} |
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
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
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
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
Oops, something went wrong.