Skip to content

Commit

Permalink
Merge branch 'master' into add-shard-fbm
Browse files Browse the repository at this point in the history
  • Loading branch information
RodZill4 authored Apr 30, 2024
2 parents beadeb1 + 431d697 commit 89511fb
Show file tree
Hide file tree
Showing 201 changed files with 5,443 additions and 384 deletions.
581 changes: 581 additions & 0 deletions addons/material_maker/nodes/anisotropic_kuwahara.mmg

Large diffs are not rendered by default.

81 changes: 80 additions & 1 deletion addons/material_maker/nodes/blend2.mmg
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,73 @@
"",
"vec3 blend_exclusion(vec2 uv, vec3 c1, vec3 c2, float opacity) {",
"\treturn opacity*vec3(blend_exclusion_f(c1.x, c2.x), blend_exclusion_f(c1.y, c2.y), blend_exclusion_f(c1.z, c2.z)) + (1.0-opacity)*c2;",
"}",
"",
"vec3 blend_hue(vec2 uv, vec3 c1, vec3 c2, float opacity) {",
"\tvec3 outcol = c2;",
"",
"\tvec3 hsv, hsv2, tmp;",
"\thsv2 = rgb_to_hsv(c1);",
"",
"\tif (hsv2.y != 0.0) {",
"\t\thsv = rgb_to_hsv(outcol);",
"\t\thsv.x = hsv2.x;",
"\t\ttmp = hsv_to_rgb(hsv);",
"\t\toutcol = mix(outcol, tmp, opacity);",
"\t}",
"\treturn outcol;",
"}",
"",
"vec3 blend_saturation(vec2 uv, vec3 c1, vec3 c2, float opacity) {",
"\tfloat facm = 1.0 - opacity;",
"",
"\tvec3 outcol = c2;",
"\tvec3 hsv, hsv2;",
"",
"\thsv = rgb_to_hsv(outcol);",
"",
"\tif (hsv.y != 0.0) {",
"\t\thsv2 = rgb_to_hsv(c1);",
"",
"\t\thsv.y = facm * hsv.y + opacity * hsv2.y;",
"\t\toutcol = hsv_to_rgb(hsv);",
"\t}",
"\treturn outcol;",
"}",
"",
"vec3 blend_color(vec2 uv, vec3 c1, vec3 c2, float opacity) {",
"\tfloat facm = 1.0 - opacity;",
"",
"\tvec3 outcol = c2;",
"",
"\tvec3 hsv, hsv2, tmp;",
"\thsv2 = rgb_to_hsv(c1);",
"",
"\tif (hsv2.y != 0.0) {",
"\t\thsv = rgb_to_hsv(outcol);",
"\t\thsv.x = hsv2.x;",
"\t\thsv.y = hsv2.y;",
"\t\ttmp = hsv_to_rgb(hsv);",
"",
"\t\toutcol = mix(outcol, tmp, opacity);",
"\t}",
"\treturn outcol;",
"}",
"",
"vec3 blend_value(vec2 uv, vec3 c1, vec3 c2, float opacity) {",
"\tfloat facm = 1.0 - opacity;",
"",
"\tvec3 hsv, hsv2;",
"\thsv = rgb_to_hsv(c2);",
"\thsv2 = rgb_to_hsv(c1);",
"",
"\thsv.z = facm * hsv.z + opacity * hsv2.z;",
"\treturn hsv_to_rgb(hsv);",
"}"
],
"includes": [
"blend"
"blend",
"adjust_hsv"
],
"inputs": [
{
Expand Down Expand Up @@ -187,6 +250,22 @@
{
"name": "Exclusion",
"value": "exclusion"
},
{
"name": "Hue",
"value": "hue"
},
{
"name": "Saturation",
"value": "saturation"
},
{
"name": "Color",
"value": "color"
},
{
"name": "Value",
"value": "value"
}
]
},
Expand Down
1 change: 1 addition & 0 deletions addons/material_maker/nodes/circular_gradient.mmg
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
],
"instance": "",
"name": "Circular Gradient",
"shortdesc": "Circular Gradient",
"outputs": [
{
"longdesc": "Number of repetitions of the gradient",
Expand Down
Loading

0 comments on commit 89511fb

Please sign in to comment.