-
Notifications
You must be signed in to change notification settings - Fork 4
/
pxf006.mms
1 lines (1 loc) · 9.73 KB
/
pxf006.mms
1
{"connections":[{"from":"shape","from_port":0,"to":"pxflib_2","to_port":0},{"from":"pxflib_3","from_port":0,"to":"rotate","to_port":0},{"from":"pxflib","from_port":0,"to":"pxflib_2","to_port":1},{"from":"rotate","from_port":0,"to":"translate","to_port":0},{"from":"translate","from_port":0,"to":"pxflib","to_port":0},{"from":"pxflib_2","from_port":0,"to":"pxflib_4","to_port":0}],"nodes":[{"name":"pxflib_3","node_position":{"x":-205.714279,"y":-106.642853},"parameters":{},"seed_value":-18261,"shader_model":{"code":"","global":"","inputs":[],"instance":"","longdesc":"Type - V4->V4 Generator\nCode - PauloFalcao\n\nInput Coordinates","name":"Axis","outputs":[{"rgba":"vec4($uv,0.0,1.0)","shortdesc":"RGBA Output","type":"rgba"}],"parameters":[],"shortdesc":"Axis"},"type":"shader"},{"name":"pxflib","node_position":{"x":-195.714279,"y":168.357147},"parameters":{"mode":0,"smooth":0.00007},"shader_model":{"code":"","global":"","inputs":[{"default":"vec4(0.0,0.0,0.0,1.0)","label":"","name":"in","shortdesc":"RGBA Input","type":"rgba"}],"instance":"","longdesc":"Type - RGBA Operator\nCode - PauloFalcao\n\nTransforms a RGBA making a mirror smooth symmetry using the chosen axis","name":"Smooth Axis Symmetry","outputs":[{"rgba":"$in($mode)","shortdesc":"RGBA output","type":"rgba"}],"parameters":[{"default":2,"label":"Axis","longdesc":"Axis","name":"mode","type":"enum","values":[{"name":"XY","value":"vec2(sqrt(($uv.xy-0.5)*($uv.xy-0.5)+$smooth))+0.5"},{"name":"X","value":"vec2(sqrt($uv.x*$uv.x+$smooth),$uv.y)+0.5"},{"name":"Y","value":"vec2($uv.x,sqrt($uv.y*$uv.y+$smooth))+0.5"}]},{"control":"None","default":0,"label":"Smooth","max":0.02,"min":0,"name":"smooth","step":0.00001,"type":"float"}],"shortdesc":"Smooth Axis Symmetry"},"type":"shader"},{"name":"translate","node_position":{"x":-216.714279,"y":73.357147},"parameters":{"translate_x":0.19,"translate_y":0.09},"type":"translate"},{"name":"rotate","node_position":{"x":-208.714279,"y":-43.642853},"parameters":{"cx":0.155,"cy":-0.52,"rotate":9.791},"type":"rotate"},{"name":"shape","node_position":{"x":-208.714279,"y":-237.642853},"parameters":{"edge":1,"radius":1,"shape":4,"sides":16},"type":"shape"},{"name":"pxflib_4","node_position":{"x":178.285721,"y":6.357147},"parameters":{"scale":1.681355},"shader_model":{"code":"","global":"vec2 scale(vec2 uv, vec2 center, vec2 scale) {\n\tuv -= center;\n\tuv /= scale;\n\tuv += center;\n return uv;\n}","inputs":[{"default":"vec4($uv, 0.0, 1.0)","label":"","longdesc":"The input image","name":"i","shortdesc":"Input","type":"rgba"}],"instance":"","longdesc":"Scales its input","name":"Simple Scale","outputs":[{"longdesc":"Shows the scaled image","rgba":"$i((($uv-vec2(0.5))*$scale)+vec2(0.5))","shortdesc":"Output","type":"rgba"}],"parameters":[{"control":"Scale1.x","default":1,"label":"Scale","longdesc":"The scale amount","max":1,"min":0,"name":"scale","step":0.001,"type":"float"}],"shortdesc":"Simple Scale"},"type":"shader"},{"name":"pxflib_2","node_position":{"x":132.285721,"y":-148.642853},"parameters":{"blend_type":0,"iterations":18,"mode":2,"opacity":1},"shader_model":{"code":"","global":"vec3 blendf_normal(vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*c1 + (1.0-opacity)*c2;\n}\n\nvec3 blendf_multiply(vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*c1*c2 + (1.0-opacity)*c2;\n}\n\nvec3 blendf_screen( vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*(1.0-(1.0-c1)*(1.0-c2)) + (1.0-opacity)*c2;\n}\n\nfloat blendf_overlay_f(float c1, float c2) {\n\treturn (c1 < 0.5) ? (2.0*c1*c2) : (1.0-2.0*(1.0-c1)*(1.0-c2));\n}\n\nvec3 blendf_overlay(vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blendf_overlay_f(c1.x, c2.x), blendf_overlay_f(c1.y, c2.y), blendf_overlay_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nvec3 blendf_hard_light(vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*0.5*(c1*c2+blendf_overlay(c1, c2, 1.0)) + (1.0-opacity)*c2;\n}\n\nfloat blendf_soft_light_f(float c1, float c2) {\n\treturn (c2 < 0.5) ? (2.0*c1*c2+c1*c1*(1.0-2.0*c2)) : 2.0*c1*(1.0-c2)+sqrt(c1)*(2.0*c2-1.0);\n}\n\nvec3 blendf_soft_light( vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blendf_soft_light_f(c1.x, c2.x), blendf_soft_light_f(c1.y, c2.y), blendf_soft_light_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nfloat blendf_burn_f(float c1, float c2) {\n\treturn (c1==0.0)?c1:max((1.0-((1.0-c2)/c1)),0.0);\n}\n\nvec3 blendf_burn(vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blendf_burn_f(c1.x, c2.x), blendf_burn_f(c1.y, c2.y), blendf_burn_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nfloat blendf_dodge_f(float c1, float c2) {\n\treturn (c1==1.0)?c1:min(c2/(1.0-c1),1.0);\n}\n\nvec3 blendf_dodge(vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blendf_dodge_f(c1.x, c2.x), blendf_dodge_f(c1.y, c2.y), blendf_dodge_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nvec3 blendf_lighten(vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*max(c1, c2) + (1.0-opacity)*c2;\n}\n\nvec3 blendf_darken(vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*min(c1, c2) + (1.0-opacity)*c2;\n}\n\nvec3 blendf_difference(vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*clamp(c2-c1, vec3(0.0), vec3(1.0)) + (1.0-opacity)*c2;\n}\n","inputs":[{"default":"0.0","function":true,"label":"Image","longdesc":"The image that will be repeated","name":"img","shortdesc":"RGBA Image","type":"rgba"},{"default":"vec4($uv,0.0,0.0)","function":true,"label":"2D Transformation","longdesc":"The transformation that will be applied each iteration, only transformations nodes can be used, like translate, scale, etc","name":"trans2d","shortdesc":"Image Transformaton","type":"rgba"}],"instance":"vec4 for_blend_$name(vec2 p) {\n vec2 t=p;\n vec4 o=$img(t);\n for(int i=0;i<$iterations;i++){\n t=$trans2d(t).xy;\n\tvec4 no=$img(t);\n\to=vec4(blendf_$blend_type(o.xyz,no.xyz,$opacity),mix(o.w,no.w,$opacity));\n }\n return o;\n}\n\nvec4 for_avg_$name(vec2 p) {\n vec2 t=p;\n vec4 no=$img(t);\n vec4 o=vec4(no.xyz*$opacity,no.w);\n for(int i=0;i<$iterations;i++){\n t=$trans2d(t).xy;\n\tno=$img(t);\n\to+=vec4(no.xyz*$opacity,no.w);\n }\n return vec4(o/($iterations.0+1.0));\n}\n\nvec4 for_fold_$name(vec2 p) {\n vec2 t=p;\n for(int i=0;i<$iterations;i++){\n t=$trans2d(t).xy;\n }\n vec4 no=$img(t);\n vec4 o=vec4(no.xyz*$opacity,no.w);\n return o;\n}\n","longdesc":"Type - RGBA Generator\nCode - PauloFalcao, RodZilla (Bending modes)\n\nRepeats a shape x Iterations times, and for each iteration uses the transformation in 2D Transformation Node.\n\n2D Transformation nodes should start with the Image \"Axis\" node, operations should not use buffer, only coordinates transformations should be used, nodes that transform colors here will transform space.\n\nThere are 3 modes available:\n - Average\n Transforms space each iteration.\n The input image is evaluated for each iteration, and at the end the average of all evaluations is returned.\n Using operators like Mirror is possible to repeat space.\n - Blend\n Transforms space each iteration.\n The input image is evaluated for each iteration.\n Each iteration the previous image is combined with the current only using the specified blending mode.\n Using operators like Mirror is possible to repeat space.\n - Fold\n Transforms space each iteration.\n The input image is evaluated only at the end.\n Using operators like Mirror is possible to repeat space.","name":"Fractal","outputs":[{"rgba":"$mode","shortdesc":"SDF3D Output","type":"rgba"}],"parameters":[{"default":24,"label":"Iterations","longdesc":"Number of Iterations","name":"iterations","type":"enum","values":[{"name":"0","value":"0"},{"name":"1","value":"1"},{"name":"2","value":"2"},{"name":"3","value":"3"},{"name":"4","value":"4"},{"name":"5","value":"5"},{"name":"6","value":"6"},{"name":"7","value":"7"},{"name":"8","value":"8"},{"name":"9","value":"9"},{"name":"10","value":"10"},{"name":"11","value":"11"},{"name":"12","value":"12"},{"name":"13","value":"13"},{"name":"14","value":"14"},{"name":"15","value":"15"},{"name":"16","value":"16"},{"name":"17","value":"17"},{"name":"18","value":"18"},{"name":"19","value":"19"},{"name":"20","value":"20"},{"name":"21","value":"21"},{"name":"22","value":"22"},{"name":"23","value":"23"},{"name":"24","value":"24"}]},{"default":2,"label":"Mode","longdesc":" - Average\n Transforms space each iteration.\n The input image is evaluated for each iteration, and at the end the average of all evaluations is returned.\n Using operators like Mirror is possible to repeat space.\n - Blend\n Transforms space each iteration.\n The input image is evaluated for each iteration.\n Each iteration the previous image is combined with the current only using the specified blending mode.\n Using operators like Mirror is possible to repeat space.\n - Fold\n Transforms space each iteration.\n The input image is evaluated only at the end.\n Using operators like Mirror is possible to repeat space.","name":"mode","type":"enum","values":[{"name":"Average","value":"for_avg_$name($uv)"},{"name":"Blend","value":"for_blend_$name($uv)"},{"name":"Fold","value":"for_fold_$name($uv)"}]},{"default":0,"label":"Blend Mode","longdesc":"The algorithm used to blend the result of each iteration","name":"blend_type","shortdesc":"Blend mode","type":"enum","values":[{"name":"Normal","value":"normal"},{"name":"Multiply","value":"multiply"},{"name":"Screen","value":"screen"},{"name":"Overlay","value":"overlay"},{"name":"Hard Light","value":"hard_light"},{"name":"Soft Light","value":"soft_light"},{"name":"Burn","value":"burn"},{"name":"Dodge","value":"dodge"},{"name":"Lighten","value":"lighten"},{"name":"Darken","value":"darken"},{"name":"Difference","value":"difference"}]},{"control":"None","default":0.5,"label":"Opacity","longdesc":"The opacity of the blend operation","max":1,"min":0,"name":"opacity","step":0.001,"type":"float"}],"shortdesc":"Fractal"},"type":"shader"}]}