Went through the rest of the .mmg files.

This commit is contained in:
Relintai 2021-10-13 18:48:59 +02:00
parent bf0afa6ad6
commit bfcf4b0475
54 changed files with 5265 additions and 6399 deletions

View File

@ -935,3 +935,238 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
# "type": "shader" # "type": "shader"
#} #}
#----------------------
#slope_blur.mmg
#{
# "connections": [
# {
# "from": "gen_inputs",
# "from_port": 0,
# "to": "buffer",
# "to_port": 0
# },
# {
# "from": "buffer",
# "from_port": 0,
# "to": "edge_detect_3_3_2",
# "to_port": 0
# },
# {
# "from": "gen_inputs",
# "from_port": 1,
# "to": "edge_detect_3_3_2",
# "to_port": 1
# },
# {
# "from": "edge_detect_3_3_2",
# "from_port": 0,
# "to": "buffer_2",
# "to_port": 0
# },
# {
# "from": "buffer_2",
# "from_port": 0,
# "to": "gen_outputs",
# "to_port": 0
# }
# ],
# "label": "Slope Blur",
# "longdesc": "Applys a blur effect on its input, following slopes of an input height map",
# "name": "slope_blur",
# "node_position": {
# "x": 0,
# "y": 0
# },
# "nodes": [
# {
# "name": "buffer",
# "node_position": {
# "x": -395.25,
# "y": -274.75
# },
# "parameters": {
# "lod": 0,
# "size": 10
# },
# "type": "buffer"
# },
# {
# "name": "gen_parameters",
# "node_position": {
# "x": -462.666626,
# "y": -397.666656
# },
# "parameters": {
# "param0": 10,
# "param1": 30
# },
# "type": "remote",
# "widgets": [
# {
# "label": "Grid size:",
# "linked_widgets": [
# {
# "node": "buffer",
# "widget": "size"
# },
# {
# "node": "edge_detect_3_3_2",
# "widget": "size"
# },
# {
# "node": "buffer_2",
# "widget": "size"
# }
# ],
# "longdesc": "The resolution of the input image",
# "name": "param0",
# "shortdesc": "Size",
# "type": "linked_control"
# },
# {
# "label": "Sigma",
# "linked_widgets": [
# {
# "node": "edge_detect_3_3_2",
# "widget": "sigma"
# }
# ],
# "longdesc": "The strength of the blur filter",
# "name": "param1",
# "shortdesc": "Sigma",
# "type": "linked_control"
# }
# ]
# },
# {
# "name": "gen_inputs",
# "node_position": {
# "x": -872.666626,
# "y": -243.392853
# },
# "parameters": {
#
# },
# "ports": [
# {
# "group_size": 0,
# "longdesc": "The input image",
# "name": "in",
# "shortdesc": "Input",
# "type": "rgba"
# },
# {
# "group_size": 0,
# "longdesc": "A height map whose slopes control the strength and direction of the blur filter",
# "name": "heightmap",
# "shortdesc": "Height map",
# "type": "f"
# }
# ],
# "seed_value": 91624,
# "type": "ios"
# },
# {
# "name": "gen_outputs",
# "node_position": {
# "x": -45.452393,
# "y": -195.392853
# },
# "parameters": {
#
# },
# "ports": [
# {
# "group_size": 0,
# "longdesc": "Shows the generated blurred image",
# "name": "port0",
# "shortdesc": "Output",
# "type": "rgba"
# }
# ],
# "type": "ios"
# },
# {
# "name": "edge_detect_3_3_2",
# "node_position": {
# "x": -401.725464,
# "y": -199.178955
# },
# "parameters": {
# "sigma": 30,
# "size": 10
# },
# "seed_value": -47470,
# "shader_model": {
# "code": "",
# "global": "",
# "inputs": [
# {
# "default": "vec4(1.0)",
# "function": true,
# "label": "",
# "name": "in",
# "type": "rgba"
# },
# {
# "default": "1.0",
# "function": true,
# "label": "",
# "name": "heightmap",
# "type": "f"
# }
# ],
# "instance": "vec4 $(name)_fct(vec2 uv) {\n\tfloat dx = 1.0/$size;\n float v = $heightmap(uv);\n\tvec2 slope = vec2($heightmap(uv+vec2(dx, 0.0))-v, $heightmap(uv+vec2(0.0, dx))-v);\n\tfloat slope_strength = length(slope)*$size;\n vec2 norm_slope = (slope_strength == 0.0) ? vec2(0.0, 1.0) : normalize(slope);\n vec2 e = dx*norm_slope;\n\tvec4 rv = vec4(0.0);\n\tfloat sum = 0.0;\n\tfloat sigma = max($sigma*slope_strength, 0.0001);\n\tfor (float i = 0.0; i <= 50.0; i += 1.0) {\n\t\tfloat coef = exp(-0.5*(pow(i/sigma, 2.0)))/(6.28318530718*sigma*sigma);\n\t\trv += $in(uv+i*e)*coef;\n\t\tsum += coef;\n\t}\n\treturn rv/sum;\n}",
# "name": "Slope Blur",
# "outputs": [
# {
# "rgba": "$(name)_fct($uv)",
# "type": "rgba"
# }
# ],
# "parameters": [
# {
# "default": 9,
# "first": 4,
# "label": "Size",
# "last": 12,
# "name": "size",
# "type": "size"
# },
# {
# "control": "None",
# "default": 0.5,
# "label": "Sigma",
# "max": 50,
# "min": 0,
# "name": "sigma",
# "step": 0.1,
# "type": "float"
# }
# ]
# },
# "type": "shader"
# },
# {
# "name": "buffer_2",
# "node_position": {
# "x": -392.952209,
# "y": -115.576294
# },
# "parameters": {
# "lod": 0,
# "size": 10
# },
# "type": "buffer"
# }
# ],
# "parameters": {
# "param0": 10,
# "param1": 30
# },
# "shortdesc": "Slope blur",
# "type": "graph"
#}

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,91 @@ extends Reference
#pattern.mmg #pattern.mmg
#----------------------
#hlsl_defs.tmpl
##define hlsl_atan(x,y) atan2(x, y)
##define mod(x,y) ((x)-(y)*floor((x)/(y)))
#inline float4 textureLod(sampler2D tex, float2 uv, float lod) {
# return tex2D(tex, uv);
#}
#inline float2 tofloat2(float x) {
# return float2(x, x);
#}
#inline float2 tofloat2(float x, float y) {
# return float2(x, y);
#}
#inline float3 tofloat3(float x) {
# return float3(x, x, x);
#}
#inline float3 tofloat3(float x, float y, float z) {
# return float3(x, y, z);
#}
#inline float3 tofloat3(float2 xy, float z) {
# return float3(xy.x, xy.y, z);
#}
#inline float3 tofloat3(float x, float2 yz) {
# return float3(x, yz.x, yz.y);
#}
#inline float4 tofloat4(float x, float y, float z, float w) {
# return float4(x, y, z, w);
#}
#inline float4 tofloat4(float x) {
# return float4(x, x, x, x);
#}
#inline float4 tofloat4(float x, float3 yzw) {
# return float4(x, yzw.x, yzw.y, yzw.z);
#}
#inline float4 tofloat4(float2 xy, float2 zw) {
# return float4(xy.x, xy.y, zw.x, zw.y);
#}
#inline float4 tofloat4(float3 xyz, float w) {
# return float4(xyz.x, xyz.y, xyz.z, w);
#}
#inline float2x2 tofloat2x2(float2 v1, float2 v2) {
# return float2x2(v1.x, v1.y, v2.x, v2.y);
#}
#----------------------
#glsl_defs.tmpl
#float rand(vec2 x) {
# return fract(cos(mod(dot(x, vec2(13.9898, 8.141)), 3.14)) * 43758.5453);
#}
#vec2 rand2(vec2 x) {
# return fract(cos(mod(vec2(dot(x, vec2(13.9898, 8.141)),
# dot(x, vec2(3.4562, 17.398))), vec2(3.14))) * 43758.5453);
#}
#vec3 rand3(vec2 x) {
# return fract(cos(mod(vec3(dot(x, vec2(13.9898, 8.141)),
# dot(x, vec2(3.4562, 17.398)),
# dot(x, vec2(13.254, 5.867))), vec3(3.14))) * 43758.5453);
#}
#float param_rnd(float minimum, float maximum, float seed) {
# return minimum+(maximum-minimum)*rand(vec2(seed));
#}
#vec3 rgb2hsv(vec3 c) {
# vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
# vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);
# vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);
#
# float d = q.x - min(q.w, q.y);
# float e = 1.0e-10;
# return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
#}
#vec3 hsv2rgb(vec3 c) {
# vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
# vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
# return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
#}
#----------------------
static func clampv3(v : Vector3, mi : Vector3, ma : Vector3) -> Vector3: static func clampv3(v : Vector3, mi : Vector3, ma : Vector3) -> Vector3:
v.x = clamp(v.x, mi.x, ma.x) v.x = clamp(v.x, mi.x, ma.x)
v.y = clamp(v.y, mi.y, ma.y) v.y = clamp(v.y, mi.y, ma.y)

View File

@ -171,3 +171,53 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
# } # }
# ], # ],
#----------------------
#mul_detect.mmg
# "code": "float $(name_uv)_d = ($in($uv)-$v)/$t;",
# "global": "",
# "inputs": [
# {
# "default": "1.0",
# "label": "",
# "name": "mul",
# "type": "f"
# },
# {
# "default": "0.0",
# "label": "",
# "name": "in",
# "type": "f"
# }
# ],
# "instance": "",
# "name": "MulDetect",
# "outputs": [
# {
# "f": "$mul($uv)*clamp(1.0-$(name_uv)_d*$(name_uv)_d, 0.0, 1.0)",
# "type": "f"
# }
# ],
# "parameters": [
# {
# "control": "None",
# "default": 0.5,
# "label": "Value",
# "max": 1,
# "min": 0,
# "name": "v",
# "step": 0.01,
# "type": "float"
# },
# {
# "control": "None",
# "default": 0.1,
# "label": "Tolerance",
# "max": 1,
# "min": 0.01,
# "name": "t",
# "step": 0.001,
# "type": "float"
# }
# ]

View File

@ -39,6 +39,85 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
# return color; # return color;
#} #}
#----------------------
#noise_anisotropic.mmg
#Generates x-axis interpolated value noise
# "outputs": [
# {
# "f": "anisotropic($(uv), vec2($(scale_x), $(scale_y)), $(seed), $(smoothness), $(interpolation))",
# "longdesc": "Shows a greyscale value noise",
# "shortdesc": "Output",
# "type": "f"
# }
# ],
# "parameters": [
# {
# "control": "None",
# "default": 4,
# "label": "Scale X",
# "longdesc": "The scale along the X axis",
# "max": 32,
# "min": 1,
# "name": "scale_x",
# "shortdesc": "Scale.x",
# "step": 1,
# "type": "float"
# },
# {
# "control": "None",
# "default": 256,
# "label": "Scale Y",
# "longdesc": "The scale along the Y axis",
# "max": 1024,
# "min": 1,
# "name": "scale_y",
# "shortdesc": "Scale.y",
# "step": 1,
# "type": "float"
# },
# {
# "control": "None",
# "default": 1,
# "label": "Smoothness",
# "longdesc": "Controls how much the noise is blurred along the x-axis",
# "max": 1,
# "min": 0,
# "name": "smoothness",
# "shortdesc": "Smoothness",
# "step": 0.01,
# "type": "float"
# },
# {
# "control": "None",
# "default": 1,
# "label": "Interpolation",
# "longdesc": "Controls the type of interpolation used for the smoothing. 0 is linear interpolation, 1 is smooth interpolation",
# "max": 1,
# "min": 0,
# "name": "interpolation",
# "shortdesc": "Interpolation",
# "step": 0.01,
# "type": "float"
# }
# ],
static func dots(uv : Vector2, size : float, density : float, pseed : float) -> float: static func dots(uv : Vector2, size : float, density : float, pseed : float) -> float:
return 0.0 return 0.0
#float anisotropic(vec2 uv, vec2 size, float seed, float smoothness, float interpolation) {\n\
# tvec2 seed2 = rand2(vec2(seed, 1.0-seed));\n\t\n\t
# vec2 xy = floor(uv*size);\n\t
# vec2 offset = vec2(rand(seed2 + xy.y), 0.0);\n\t
# vec2 xy_offset = floor(uv * size + offset );\n
#
# float f0 = rand(seed2+mod(xy_offset, size));\n
# float f1 = rand(seed2+mod(xy_offset+vec2(1.0, 0.0), size));\n\t
# float mixer = clamp( (fract(uv.x*size.x+offset.x) -.5) / smoothness + 0.5, 0.0, 1.0 );\n
# float smooth_mix = smoothstep(0.0, 1.0, mixer);\n\t
# float linear = mix(f0, f1, mixer);\n\t
# float smoothed = mix(f0, f1, smooth_mix);\n\t\n
#
# return mix(linear, smoothed, interpolation);\n
#}

View File

@ -302,6 +302,58 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
# } # }
# ] # ]
#----------------------
#sine_wave.mmg
#Draws a greyscale sine wave pattern
# "outputs": [
# {
# "f": "1.0-abs(2.0*($uv.y-0.5)-$amplitude*sin(($frequency*$uv.x+$phase)*6.28318530718))",
# "longdesc": "Shows a greyscale image of a sine wave",
# "shortdesc": "Output",
# "type": "f"
# }
# ],
# "parameters": [
# {
# "control": "None",
# "default": 0.5,
# "label": "Amplitude",
# "longdesc": "The amplitude of the sine wave function",
# "max": 1,
# "min": 0,
# "name": "amplitude",
# "shortdesc": "Amplitude",
# "step": 0.01,
# "type": "float"
# },
# {
# "control": "None",
# "default": 1,
# "label": "Frequency",
# "longdesc": "The frequency of the sine wave function (i.e. the number of oscillations shown in the generated image).",
# "max": 16,
# "min": 0,
# "name": "frequency",
# "shortdesc": "Frequency",
# "step": 1,
# "type": "float"
# },
# {
# "control": "None",
# "default": 0,
# "label": "Phase",
# "longdesc": "The phase of the sine wave function",
# "max": 1,
# "min": 0,
# "name": "phase",
# "shortdesc": "Phase",
# "step": 0.01,
# "type": "float"
# }
# ],
enum CombinerAxisType { enum CombinerAxisType {
SINE, SINE,
TRIANGLE, TRIANGLE,

View File

@ -0,0 +1,147 @@
tool
extends Reference
const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
#----------------------
#profile.mmg
# "inputs": [
# {
# "default": "dot($gradient($uv.x).xyz, vec3(1.0/3.0))",
# "label": "2:",
# "name": "in",
# "type": "f"
# }
# ],
# "outputs": [
# {
# "f": "draw_profile_$style($uv, $in($uv), (dot($gradient($uv.x+0.001).xyz, vec3(1.0/3.0))-dot($gradient($uv.x-0.001).xyz, vec3(1.0/3.0)))/0.002, max(0.0001, $width))",
# "longdesc": "An image showing the profile defined by the gradient",
# "shortdesc": "Output",
# "type": "f"
# }
# ],
# "parameters": [
# {
# "default": 0,
# "label": "",
# "longdesc": "Style of the output image (fill or curve)",
# "name": "style",
# "shortdesc": "Style",
# "type": "enum",
# "values": [
# {
# "name": "Curve",
# "value": "curve"
# },
# {
# "name": "Fill",
# "value": "fill"
# }
# ]
# },
# {
# "default": {
# "interpolation": 1,
# "points": [
# {
# "a": 1,
# "b": 0,
# "g": 0,
# "pos": 0,
# "r": 0
# },
# {
# "a": 1,
# "b": 1,
# "g": 1,
# "pos": 1,
# "r": 1
# }
# ],
# "type": "Gradient"
# },
# "label": "",
# "longdesc": "Gradient that defines the profile to be shown",
# "name": "gradient",
# "shortdesc": "Gradient",
# "type": "gradient"
# },
# {
# "control": "None",
# "default": 0.05,
# "label": "",
# "longdesc": "Width of the curve",
# "max": 1,
# "min": 0,
# "name": "width",
# "shortdesc": "Width",
# "step": 0.01,
# "type": "float"
# }
# ]
#----------------------
#uniform.mmg
#Draws a uniform image
# "outputs": [
# {
# "longdesc": "A uniform image of the selected color",
# "rgba": "$(color)",
# "shortdesc": "Output",
# "type": "rgba"
# }
# ],
# "parameters": [
# {
# "default": {
# "a": 1,
# "b": 1,
# "g": 1,
# "r": 1
# },
# "label": "",
# "longdesc": "Color of the uniform image",
# "name": "color",
# "shortdesc": "Color",
# "type": "color"
# }
# ]
#----------------------
#uniform_greyscale.mmg
#Draws a uniform greyscale image
# "outputs": [
# {
# "f": "$(color)",
# "longdesc": "A uniform image of the selected value",
# "shortdesc": "Output",
# "type": "f"
# }
# ],
# "parameters": [
# {
# "control": "None",
# "default": 0.5,
# "label": "",
# "longdesc": "The value of the uniform greyscale image",
# "max": 1,
# "min": 0,
# "name": "color",
# "shortdesc": "Value",
# "step": 0.01,
# "type": "float"
# }
# ]
#float draw_profile_fill(vec2 uv, float y, float dy, float w) {\n\t
# return 1.0-clamp(sin(1.57079632679-atan(dy))*(1.0-uv.y-y)/w, 0.0, 1.0);\n
#}
#float draw_profile_curve(vec2 uv, float y, float dy, float w) {\n\t
# return 1.0-clamp(sin(1.57079632679-atan(dy))*abs(1.0-uv.y-y)/w, 0.0, 1.0);\n
#}

View File

@ -1752,6 +1752,130 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
# "type": "shader" # "type": "shader"
#} #}
#----------------------
#repeat.mmg
#Translates, rotates and scales its input
# "inputs": [
# {
# "default": "vec4($uv, 0.0, 1.0)",
# "label": "",
# "longdesc": "The input image to be transformed",
# "name": "i",
# "shortdesc": "Input",
# "type": "rgba"
# }
# ],
# "outputs": [
# {
# "longdesc": "Shows the transformed image",
# "rgba": "$i(fract($uv))",
# "shortdesc": "Output",
# "type": "rgba"
# }
# ],
#----------------------
#remap.mmg
#The remapped image map
# "code": "float $(name_uv)_x = $in($uv)*($max-$min);",
# "inputs": [
# {
# "default": "0.0",
# "label": "",
# "longdesc": "The greyscale input map",
# "name": "in",
# "shortdesc": "Input",
# "type": "f"
# }
# ],
# "outputs": [
# {
# "f": "$min+$(name_uv)_x-mod($(name_uv)_x, max($step, 0.00000001))",
# "longdesc": "The remapped image map",
# "shortdesc": "Output",
# "type": "f"
# }
# ],
# "parameters": [
# {
# "control": "None",
# "default": 0,
# "label": "Min",
# "longdesc": "The value generated for black areas of the input",
# "max": 10,
# "min": -10,
# "name": "min",
# "shortdesc": "Min",
# "step": 0.01,
# "type": "float"
# },
# {
# "control": "None",
# "default": 0,
# "label": "Max",
# "longdesc": "The value generated for white areas of the input",
# "max": 10,
# "min": -10,
# "name": "max",
# "shortdesc": "Max",
# "step": 0.01,
# "type": "float"
# },
# {
# "control": "None",
# "default": 0,
# "label": "Step",
# "longdesc": "The step between generated values",
# "max": 1,
# "min": 0,
# "name": "step",
# "shortdesc": "Step",
# "step": 0.01,
# "type": "float"
# }
# ],
#----------------------
#height_to_angle.mmg
#Generates an angle map to be used by Advances Tiler nodes from a heightmap
# "inputs": [
# {
# "default": "0.0",
# "function": true,
# "label": "",
# "longdesc": "The input heightmap",
# "name": "in",
# "shortdesc": "Input",
# "type": "f"
# }
# ],
# "instance": "float $(name)_fct(vec2 uv, float epsilon) {\n\tvec3 e = vec3(epsilon, -epsilon, 0);\n\tvec2 rv = vec2(1.0, -1.0)*$in(uv+e.xy);\n\trv += vec2(-1.0, 1.0)*$in(uv-e.xy);\n\trv += vec2(1.0, 1.0)*$in(uv+e.xx);\n\trv += vec2(-1.0, -1.0)*$in(uv-e.xx);\n\trv += vec2(2.0, 0.0)*$in(uv+e.xz);\n\trv += vec2(-2.0, 0.0)*$in(uv-e.xz);\n\trv += vec2(0.0, 2.0)*$in(uv+e.zx);\n\trv += vec2(0.0, -2.0)*$in(uv-e.zx);\n\treturn atan(rv.y, rv.x)/3.141592;\n}",
# "outputs": [
# {
# "f": "$(name)_fct($uv, 0.0001)+$angle/180.0",
# "longdesc": "The generated angle map. Values are between -1 and 1 and the corresponding Advanced Tiler parameter (Rotate) must be set to 180.",
# "shortdesc": "Output",
# "type": "f"
# }
# ],
# "parameters": [
# {
# "control": "None",
# "default": 0,
# "label": "",
# "longdesc": "The offset angle applied to the generated map",
# "max": 180,
# "min": -180,
# "name": "angle",
# "shortdesc": "Angle",
# "step": 0.01,
# "type": "float"
# }
# ],
#vec2 transform(vec2 uv, vec2 translate, float rotate, vec2 scale, bool repeat) {\n \t #vec2 transform(vec2 uv, vec2 translate, float rotate, vec2 scale, bool repeat) {\n \t
# vec2 rv;\n\t # vec2 rv;\n\t
# uv -= translate;\n\t # uv -= translate;\n\t

View File

@ -1,386 +0,0 @@
{
"connections": [
{
"from": "graph",
"from_port": 0,
"to": "tones_map",
"to_port": 1
},
{
"from": "graph",
"from_port": 1,
"to": "tones_map",
"to_port": 2
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "graph",
"to_port": 0
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "tones_map",
"to_port": 0
},
{
"from": "tones_map",
"from_port": 0,
"to": "gen_outputs",
"to_port": 0
}
],
"label": "Auto Tones",
"longdesc": "Finds the minimum and maximum values in the input texture and tone maps it to the full 0.0 - 1.0 range.",
"name": "auto_tones",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"connections": [
{
"from": "combine",
"from_port": 0,
"to": "iterate_buffer",
"to_port": 0
},
{
"from": "decompose",
"from_port": 0,
"to": "gen_outputs",
"to_port": 0
},
{
"from": "decompose",
"from_port": 1,
"to": "gen_outputs",
"to_port": 1
},
{
"from": "iterate_buffer",
"from_port": 0,
"to": "decompose",
"to_port": 0
},
{
"from": "iterate_buffer",
"from_port": 1,
"to": "14423",
"to_port": 0
},
{
"from": "14423",
"from_port": 0,
"to": "iterate_buffer",
"to_port": 1
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "combine",
"to_port": 0
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "combine",
"to_port": 1
}
],
"label": "Find Min Max",
"longdesc": "",
"name": "graph",
"node_position": {
"x": 1105.399902,
"y": -179.398849
},
"nodes": [
{
"name": "14423",
"node_position": {
"x": 344,
"y": 217
},
"parameters": {
"size": 10
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec3(0.0)",
"function": true,
"label": "",
"name": "in",
"type": "rgb"
}
],
"instance": "vec3 $(name)_compare(vec2 uv, float size) {\n\tfloat iter = $in(uv).b;\n\tsize = size / pow(2.0, (iter * 100.0) );\n\titer += 0.01;\n\tfloat pixel_offset = 1.0 / size;\n\tvec2 half_res_uv = floor(uv * size / 2.0) / size * 2.0 + pixel_offset / 2.0;\n\tvec3 values[4];\n\tvalues[0] = $in(half_res_uv);\n\tvalues[1] = $in(half_res_uv + vec2(pixel_offset, 0.0));\n\tvalues[2] = $in(half_res_uv + vec2(0.0, pixel_offset));\n\tvalues[3] = $in(half_res_uv + vec2(pixel_offset, pixel_offset));\n\t\n\tfloat lowest = 1.0;\n\tfloat highest = 0.0;\n\t\n\tfor (int i = 0; i < 4; i++) {\n\t\tlowest = values[i].r < lowest ? values[i].r : lowest;\n\t\thighest = values[i].g > highest ? values[i].g : highest;\n\t}\n\t\n\treturn vec3( lowest, highest , iter);\n}",
"name": "Compare Neighbor",
"outputs": [
{
"rgb": "$(name)_compare($uv, $size)",
"type": "rgb"
}
],
"parameters": [
{
"default": 10,
"first": 1,
"label": "",
"last": 13,
"name": "size",
"type": "size"
}
]
},
"type": "shader"
},
{
"name": "iterate_buffer",
"node_position": {
"x": 328,
"y": 63
},
"parameters": {
"filter": false,
"iterations": 13,
"mipmap": false,
"size": 10
},
"seed_value": 29168,
"type": "iterate_buffer"
},
{
"name": "combine",
"node_position": {
"x": 376,
"y": -75
},
"parameters": {
},
"type": "combine"
},
{
"name": "decompose",
"node_position": {
"x": 605,
"y": 64
},
"parameters": {
},
"type": "decompose"
},
{
"name": "gen_inputs",
"node_position": {
"x": -199,
"y": 23
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "",
"name": "in",
"shortdesc": "In",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_outputs",
"node_position": {
"x": 831,
"y": 42
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "",
"name": "min",
"shortdesc": "Min",
"type": "f"
},
{
"group_size": 0,
"longdesc": "",
"name": "max",
"shortdesc": "Max",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_parameters",
"node_position": {
"x": 248.399994,
"y": -292
},
"parameters": {
"param0": 10
},
"type": "remote",
"widgets": [
{
"label": "Size",
"linked_widgets": [
{
"node": "iterate_buffer",
"widget": "size"
},
{
"node": "14423",
"widget": "size"
}
],
"name": "param0",
"type": "linked_control"
}
]
}
],
"parameters": {
"param0": 10
},
"shortdesc": "",
"type": "graph"
},
{
"name": "tones_map",
"node_position": {
"x": 1142.528442,
"y": -88.26989
},
"parameters": {
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4(0.5 ,0.5, 0.5, 1.0)",
"label": "",
"longdesc": "The input image",
"name": "in",
"shortdesc": "Input",
"type": "f"
},
{
"default": "0.0",
"label": "",
"name": "in_min",
"type": "f"
},
{
"default": "1.0",
"label": "",
"name": "in_max",
"type": "f"
}
],
"instance": "",
"longdesc": "Maps linearly an input tones interval to an output tones interval.",
"name": "Mapping",
"outputs": [
{
"f": "($in($uv)-$in_min($uv))/($in_max($uv)-$in_min($uv))",
"longdesc": "Shows the generated remapped image",
"shortdesc": "Output",
"type": "f"
}
],
"parameters": [
],
"shortdesc": "Tones map"
},
"type": "shader"
},
{
"name": "gen_inputs",
"node_position": {
"x": 665.528564,
"y": -136.535721
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The input image",
"name": "in",
"shortdesc": "Input",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_outputs",
"node_position": {
"x": 1425.400024,
"y": -135.535721
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "Shows the generated remapped image",
"name": "out",
"shortdesc": "Output",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_parameters",
"node_position": {
"x": 1024.664307,
"y": -298.400757
},
"parameters": {
"param0": 10
},
"type": "remote",
"widgets": [
{
"label": "",
"linked_widgets": [
{
"node": "graph",
"widget": "param0"
}
],
"longdesc": "Buffers are used to find the mininum and maximum values for the input image. If the input has small details a higher resolution buffer might be needed to capture precise min and max values.\n\nNote: The output itself will not be buffered.",
"name": "param0",
"shortdesc": "Size",
"type": "linked_control"
}
]
}
],
"parameters": {
"param0": 10
},
"shortdesc": "Auto Tones",
"type": "graph"
}

View File

@ -1,126 +0,0 @@
{
"name": "blend",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"amount": 0.5,
"blend_type": 0
},
"shader_model": {
"code": "vec4 $(name_uv)_s1 = $s1($uv);\nvec4 $(name_uv)_s2 = $s2($uv);\nfloat $(name_uv)_a = $amount*$a($uv);\n",
"global": "vec3 blend_normal(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*c1 + (1.0-opacity)*c2;\n}\n\nvec3 blend_dissolve(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\tif (rand(uv) < opacity) {\n\t\treturn c1;\n\t} else {\n\t\treturn c2;\n\t}\n}\n\nvec3 blend_multiply(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*c1*c2 + (1.0-opacity)*c2;\n}\n\nvec3 blend_screen(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*(1.0-(1.0-c1)*(1.0-c2)) + (1.0-opacity)*c2;\n}\n\nfloat blend_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 blend_overlay(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blend_overlay_f(c1.x, c2.x), blend_overlay_f(c1.y, c2.y), blend_overlay_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nvec3 blend_hard_light(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*0.5*(c1*c2+blend_overlay(uv, c1, c2, 1.0)) + (1.0-opacity)*c2;\n}\n\nfloat blend_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 blend_soft_light(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blend_soft_light_f(c1.x, c2.x), blend_soft_light_f(c1.y, c2.y), blend_soft_light_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nfloat blend_burn_f(float c1, float c2) {\n\treturn (c1==0.0)?c1:max((1.0-((1.0-c2)/c1)),0.0);\n}\n\nvec3 blend_burn(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blend_burn_f(c1.x, c2.x), blend_burn_f(c1.y, c2.y), blend_burn_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nfloat blend_dodge_f(float c1, float c2) {\n\treturn (c1==1.0)?c1:min(c2/(1.0-c1),1.0);\n}\n\nvec3 blend_dodge(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blend_dodge_f(c1.x, c2.x), blend_dodge_f(c1.y, c2.y), blend_dodge_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nvec3 blend_lighten(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*max(c1, c2) + (1.0-opacity)*c2;\n}\n\nvec3 blend_darken(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*min(c1, c2) + (1.0-opacity)*c2;\n}\n\nvec3 blend_difference(vec2 uv, 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": "vec4($uv.x, 1.0, 1.0, 1.0)",
"label": "Source1",
"longdesc": "The foreground input",
"name": "s1",
"shortdesc": "Foreground",
"type": "rgba"
},
{
"default": "vec4(1.0, $uv.y, 1.0, 1.0)",
"label": "Source2",
"longdesc": "The background input",
"name": "s2",
"shortdesc": "Background",
"type": "rgba"
},
{
"default": "1.0",
"label": "Opacity",
"longdesc": "The optional opacity mask",
"name": "a",
"shortdesc": "Mask",
"type": "f"
}
],
"instance": "",
"longdesc": "Blends its input, using an optional mask",
"name": "Blend",
"outputs": [
{
"longdesc": "Shows the result of the blend operation",
"rgba": "vec4(blend_$blend_type($uv, $(name_uv)_s1.rgb, $(name_uv)_s2.rgb, $(name_uv)_a*$(name_uv)_s1.a), min(1.0, $(name_uv)_s2.a+$(name_uv)_a*$(name_uv)_s1.a))",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"default": 0,
"label": "",
"longdesc": "The algorithm used to blend the inputs",
"name": "blend_type",
"shortdesc": "Blend mode",
"type": "enum",
"values": [
{
"name": "Normal",
"value": "normal"
},
{
"name": "Dissolve",
"value": "dissolve"
},
{
"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": "3:",
"longdesc": "The opacity of the blend operation",
"max": 1,
"min": 0,
"name": "amount",
"shortdesc": "Opacity",
"step": 0.01,
"type": "float"
}
],
"shortdesc": "Blend"
},
"type": "shader"
}

View File

@ -1,169 +0,0 @@
{
"name": "brush",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"has_albedo": true,
"has_depth": false,
"has_emission": false,
"has_normal": false,
"has_metallic": true,
"has_roughness": true,
"mode": 0
},
"is_brush": true,
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "clamp(1.0-2.0*length($uv-vec2(0.5)), 0.0, 1.0)",
"label": "Brush",
"name": "brush",
"type": "f"
},
{
"default": "vec4(1.0)",
"group_size": 5,
"label": "Albedo",
"name": "albedo",
"type": "rgba"
},
{
"default": "0.0",
"label": "Metallic",
"name": "metallic",
"type": "f"
},
{
"default": "0.0",
"label": "Roughness",
"name": "roughness",
"type": "f"
},
{
"default": "vec4(0.0)",
"label": "Emission",
"name": "emission",
"type": "rgba"
},
{
"default": "vec4(0.5, 0.5, 0.0, 0.0)",
"label": "Normal",
"name": "normal",
"type": "rgba"
},
{
"default": "0.0",
"label": "Depth",
"name": "depth",
"type": "f"
},
{
"default": "1.0",
"label": "Occlusion",
"name": "ao",
"type": "f"
}
],
"instance": "",
"name": "Brush",
"outputs": [
{
"f": "$brush($uv)",
"type": "f"
},
{
"rgba": "$albedo($uv)",
"type": "rgba"
},
{
"rgba": "vec4($metallic($uv), $roughness($uv), $has_metallic ? $albedo($uv).a : 0.0, $has_roughness ? $albedo($uv).a : 0.0)",
"type": "rgba"
},
{
"rgba": "$emission($uv)",
"type": "rgba"
},
{
"rgba": "$normal($uv)",
"type": "rgba"
},
{
"rgba": "vec4($depth($uv), $ao($uv), $has_depth ? $albedo($uv).a : 0.0, $has_ao ? $albedo($uv).a : 0.0)",
"type": "rgba"
},
{
"rgba": "vec4(vec3(1.0), $albedo($uv).a)",
"type": "rgba"
}
],
"parameters": [
{
"default": 0,
"label": "",
"name": "mode",
"type": "enum",
"values": [
{
"name": "Stamp",
"value": "stamp"
},
{
"name": "Pattern",
"value": "pattern"
},
{
"name": "UV Pattern",
"value": "uv_pattern"
}
]
},
{
"default": true,
"label": "",
"name": "has_albedo",
"type": "boolean"
},
{
"default": false,
"label": "",
"name": "has_metallic",
"type": "boolean"
},
{
"default": false,
"label": "",
"name": "has_roughness",
"type": "boolean"
},
{
"default": false,
"label": "",
"name": "has_emission",
"type": "boolean"
},
{
"default": false,
"label": "",
"name": "has_normal",
"type": "boolean"
},
{
"default": false,
"label": "",
"name": "has_depth",
"type": "boolean"
},
{
"default": false,
"label": "",
"name": "has_ao",
"type": "boolean"
}
]
},
"type": "brush_node"
}

View File

@ -1,56 +0,0 @@
{
"name": "brush_select_from_id",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"id": {
"a": 1,
"b": 1,
"g": 1,
"r": 0,
"type": "Color"
}
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4(1.0)",
"label": "",
"name": "in",
"type": "rgba"
},
{
"default": "vec4(1.0)",
"label": "",
"name": "ids",
"type": "rgba"
}
],
"instance": "",
"name": "Select From ID",
"outputs": [
{
"rgba": "$in($uv)*vec4(1.0, 1.0, 1.0, step(length($ids($uv)-$id), 0.01))",
"type": "rgba"
}
],
"parameters": [
{
"default": {
"a": 1,
"b": 1,
"g": 1,
"r": 1
},
"label": "",
"name": "id",
"type": "color"
}
]
},
"type": "shader"
}

View File

@ -1,64 +0,0 @@
{
"name": "combine",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "0.0",
"label": "R",
"longdesc": "The greyscale input for the red channel",
"name": "r",
"shortdesc": "Red",
"type": "f"
},
{
"default": "0.0",
"label": "G",
"longdesc": "The greyscale input for the green channel",
"name": "g",
"shortdesc": "Green",
"type": "f"
},
{
"default": "0.0",
"label": "B",
"longdesc": "The greyscale input for the blue channel",
"name": "b",
"shortdesc": "Blue",
"type": "f"
},
{
"default": "1.0",
"label": "A",
"longdesc": "The greyscale input for the alpha channel",
"name": "a",
"shortdesc": "Alpha",
"type": "f"
}
],
"instance": "",
"longdesc": "Combines 4 greyscale inputs into an RGBA image",
"name": "Combine",
"outputs": [
{
"longdesc": "Shows the combined RGBA image",
"rgba": "vec4($r($uv), $g($uv), $b($uv), $a($uv))",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
],
"shortdesc": "Combine"
},
"type": "shader"
}

View File

@ -1,40 +0,0 @@
{
"name": "compare",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "0.0",
"label": "",
"name": "in1",
"type": "rgba"
},
{
"default": "0.0",
"label": "",
"name": "in2",
"type": "rgba"
}
],
"instance": "",
"name": "Compare",
"outputs": [
{
"f": "dot(abs($in1($uv)-$in2($uv)), vec4(1.0))",
"type": "f"
}
],
"parameters": [
]
},
"type": "shader"
}

View File

@ -1,242 +0,0 @@
{
"connections": [
{
"from": "gen_inputs",
"from_port": 0,
"to": "buffer",
"to_port": 0
},
{
"from": "buffer",
"from_port": 0,
"to": "598",
"to_port": 0
},
{
"from": "598",
"from_port": 0,
"to": "gen_outputs",
"to_port": 0
}
],
"label": "Emboss",
"longdesc": "Creates highlights and shadows from an input heightmap",
"name": "emboss",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"name": "buffer",
"node_position": {
"x": -65.493774,
"y": -609.5
},
"parameters": {
"lod": 0,
"size": 9
},
"seed_value": 10109,
"type": "buffer"
},
{
"name": "598",
"node_position": {
"x": -77.579605,
"y": -529.738281
},
"parameters": {
"amount": 5,
"angle": 0,
"size": 9,
"width": 1
},
"shader_model": {
"code": "",
"global": "",
"includes": [
""
],
"inputs": [
{
"default": "0.0",
"function": true,
"label": "",
"name": "in",
"type": "f"
}
],
"instance": "float $(name)_fct(vec2 uv) {\n\tfloat pixels = max(1.0, $width);\n\tfloat e = 1.0/$size;\n\tfloat rv = 0.0;\n\tfor (float dx = -pixels; dx <= pixels; dx += 1.0) {\n\t\tfor (float dy = -pixels; dy <= pixels; dy += 1.0) {\n\t\t\tif (abs(dx) > 0.5 || abs(dy) > 0.5) {\n\t\t\t\trv += $in(uv+e*vec2(dx, dy))*cos(atan(dy, dx)-$angle*3.14159265359/180.0)/length(vec2(dx, dy));\n\t\t\t}\n\t\t}\n\t}\n\treturn $amount*rv/pixels+0.5;\n}",
"name": "Emboss",
"outputs": [
{
"f": "$(name)_fct($uv)",
"type": "f"
}
],
"parameters": [
{
"default": 9,
"first": 6,
"label": "Size",
"last": 12,
"name": "size",
"type": "size"
},
{
"control": "None",
"default": 0,
"label": "Angle",
"max": 180,
"min": -180,
"name": "angle",
"step": 0.1,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Amount",
"max": 10,
"min": 0,
"name": "amount",
"step": 0.1,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Width",
"max": 5,
"min": 1,
"name": "width",
"step": 1,
"type": "float"
}
]
},
"type": "shader"
},
{
"name": "gen_inputs",
"node_position": {
"x": -461.57959,
"y": -574.119141
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The input height map",
"name": "port0",
"shortdesc": "Input",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_outputs",
"node_position": {
"x": 187.506226,
"y": -557.119141
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The generated image",
"name": "port0",
"shortdesc": "Output",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_parameters",
"node_position": {
"x": -111.036682,
"y": -777.5
},
"parameters": {
"param0": 9,
"param1": 0,
"param2": 5,
"param3": 1
},
"type": "remote",
"widgets": [
{
"label": "Size",
"linked_widgets": [
{
"node": "buffer",
"widget": "size"
},
{
"node": "598",
"widget": "size"
}
],
"longdesc": "The resolution of the input image",
"name": "param0",
"shortdesc": "Size",
"type": "linked_control"
},
{
"label": "Angle",
"linked_widgets": [
{
"node": "598",
"widget": "angle"
}
],
"longdesc": "The angle of the simulated light",
"name": "param1",
"shortdesc": "Angle",
"type": "linked_control"
},
{
"label": "Amount",
"linked_widgets": [
{
"node": "598",
"widget": "amount"
}
],
"longdesc": "The strength of the emboss effect",
"name": "param2",
"shortdesc": "Strength",
"type": "linked_control"
},
{
"label": "Width",
"linked_widgets": [
{
"node": "598",
"widget": "width"
}
],
"longdesc": "The width (in pixels) of the area sampled for each pixel",
"name": "param3",
"shortdesc": "Width",
"type": "linked_control"
}
]
}
],
"parameters": {
"param0": 9,
"param1": 0,
"param2": 5,
"param3": 1
},
"shortdesc": "Emboss",
"type": "graph"
}

View File

@ -1,34 +0,0 @@
float rand(vec2 x) {
return fract(cos(mod(dot(x, vec2(13.9898, 8.141)), 3.14)) * 43758.5453);
}
vec2 rand2(vec2 x) {
return fract(cos(mod(vec2(dot(x, vec2(13.9898, 8.141)),
dot(x, vec2(3.4562, 17.398))), vec2(3.14))) * 43758.5453);
}
vec3 rand3(vec2 x) {
return fract(cos(mod(vec3(dot(x, vec2(13.9898, 8.141)),
dot(x, vec2(3.4562, 17.398)),
dot(x, vec2(13.254, 5.867))), vec3(3.14))) * 43758.5453);
}
float param_rnd(float minimum, float maximum, float seed) {
return minimum+(maximum-minimum)*rand(vec2(seed));
}
vec3 rgb2hsv(vec3 c) {
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);
vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsv2rgb(vec3 c) {
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}

View File

@ -1,52 +0,0 @@
{
"name": "height_to_angle",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"angle": 0
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "0.0",
"function": true,
"label": "",
"longdesc": "The input heightmap",
"name": "in",
"shortdesc": "Input",
"type": "f"
}
],
"instance": "float $(name)_fct(vec2 uv, float epsilon) {\n\tvec3 e = vec3(epsilon, -epsilon, 0);\n\tvec2 rv = vec2(1.0, -1.0)*$in(uv+e.xy);\n\trv += vec2(-1.0, 1.0)*$in(uv-e.xy);\n\trv += vec2(1.0, 1.0)*$in(uv+e.xx);\n\trv += vec2(-1.0, -1.0)*$in(uv-e.xx);\n\trv += vec2(2.0, 0.0)*$in(uv+e.xz);\n\trv += vec2(-2.0, 0.0)*$in(uv-e.xz);\n\trv += vec2(0.0, 2.0)*$in(uv+e.zx);\n\trv += vec2(0.0, -2.0)*$in(uv-e.zx);\n\treturn atan(rv.y, rv.x)/3.141592;\n}",
"longdesc": "Generates an angle map to be used by Advances Tiler nodes from a heightmap",
"name": "Height To Angle",
"outputs": [
{
"f": "$(name)_fct($uv, 0.0001)+$angle/180.0",
"longdesc": "The generated angle map. Values are between -1 and 1 and the corresponding Advanced Tiler parameter (Rotate) must be set to 180.",
"shortdesc": "Output",
"type": "f"
}
],
"parameters": [
{
"control": "None",
"default": 0,
"label": "",
"longdesc": "The offset angle applied to the generated map",
"max": 180,
"min": -180,
"name": "angle",
"shortdesc": "Angle",
"step": 0.01,
"type": "float"
}
],
"shortdesc": "Height to angle"
},
"type": "shader"
}

View File

@ -1,41 +0,0 @@
#define hlsl_atan(x,y) atan2(x, y)
#define mod(x,y) ((x)-(y)*floor((x)/(y)))
inline float4 textureLod(sampler2D tex, float2 uv, float lod) {
return tex2D(tex, uv);
}
inline float2 tofloat2(float x) {
return float2(x, x);
}
inline float2 tofloat2(float x, float y) {
return float2(x, y);
}
inline float3 tofloat3(float x) {
return float3(x, x, x);
}
inline float3 tofloat3(float x, float y, float z) {
return float3(x, y, z);
}
inline float3 tofloat3(float2 xy, float z) {
return float3(xy.x, xy.y, z);
}
inline float3 tofloat3(float x, float2 yz) {
return float3(x, yz.x, yz.y);
}
inline float4 tofloat4(float x, float y, float z, float w) {
return float4(x, y, z, w);
}
inline float4 tofloat4(float x) {
return float4(x, x, x, x);
}
inline float4 tofloat4(float x, float3 yzw) {
return float4(x, yzw.x, yzw.y, yzw.z);
}
inline float4 tofloat4(float2 xy, float2 zw) {
return float4(xy.x, xy.y, zw.x, zw.y);
}
inline float4 tofloat4(float3 xyz, float w) {
return float4(xyz.x, xyz.y, xyz.z, w);
}
inline float2x2 tofloat2x2(float2 v1, float2 v2) {
return float2x2(v1.x, v1.y, v2.x, v2.y);
}

View File

@ -1,40 +0,0 @@
{
"name": "invert",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4(1.0, 1.0, 1.0, 1.0)",
"label": "",
"longdesc": "The input image",
"name": "in",
"shortdesc": "Input",
"type": "rgba"
}
],
"instance": "",
"longdesc": "A filter that inverts the R, G, and B channels of its input while keeping the A channel unchanged",
"name": "Invert",
"outputs": [
{
"longdesc": "Shows the inverted image",
"rgba": "vec4(vec3(1.0)-$in($uv).rgb, $in($uv).a)",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
],
"shortdesc": "Invert filter"
},
"type": "shader"
}

View File

@ -1,112 +0,0 @@
[
{
"name":"f",
"label":"Greyscale",
"type":"float",
"paramdefs":"vec2 uv",
"params":"uv",
"slot_type":0,
"convert":[
{ "type":"rgb", "expr":"vec3($(value))" },
{ "type":"rgba", "expr":"vec4(vec3($(value)), 1.0)" }
],
"color":{ "r":0.5, "g":0.5, "b":0.5, "a":1.0 }
},
{
"name":"rgb",
"label":"Color",
"type":"vec3",
"paramdefs":"vec2 uv",
"params":"uv",
"slot_type":0,
"convert":[
{ "type":"f", "expr":"(dot($(value), vec3(1.0))/3.0)" },
{ "type":"rgba", "expr":"vec4($(value), 1.0)" }
],
"color":{ "r":0.5, "g":0.5, "b":1.0, "a":1.0 }
},
{
"name":"rgba",
"label":"RGBA",
"type":"vec4",
"paramdefs":"vec2 uv",
"params":"uv",
"slot_type":0,
"convert":[
{ "type":"f", "expr":"(dot(($(value)).rgb, vec3(1.0))/3.0)" },
{ "type":"rgb", "expr":"(($(value)).rgb)" }
],
"color":{ "r":0.0, "g":0.5, "b":0.0, "a":0.5 }
},
{
"name":"sdf2d",
"label":"SDF2D",
"type":"float",
"paramdefs":"vec2 uv",
"params":"uv",
"slot_type":1,
"color":{ "r":1.0, "g":0.5, "b":0.0, "a":1.0 }
},
{
"name":"sdf3d",
"label":"SDF3D",
"type":"float",
"paramdefs":"vec3 p",
"params":"p",
"slot_type":2,
"convert":[
{ "type":"sdf3dc", "expr":"vec2($(value), 0.0)" }
],
"color":{ "r":0.5, "g":0.0, "b":0.0, "a":1.0 }
},
{
"name":"sdf3dc",
"label":"SDF3D-C",
"type":"vec2",
"paramdefs":"vec3 p",
"params":"p",
"slot_type":2,
"convert":[
{ "type":"sdf3d", "expr":"($(value)).x" }
],
"color":{ "r":1.0, "g":0.0, "b":0.0, "a":1.0 }
},
{
"name":"tex3d_gs",
"label":"Greyscale TEX3D",
"type":"float",
"paramdefs":"vec4 p",
"params":"p",
"slot_type":3,
"convert":[
{ "type":"tex3d", "expr":"vec3($(value))" }
],
"color":{ "r":0.8, "g":0.0, "b":1.0, "a":1.0 }
},
{
"name":"tex3d",
"label":"TEX3D",
"type":"vec3",
"paramdefs":"vec4 p",
"params":"p",
"slot_type":3,
"convert":[
{ "type":"tex3d_gs", "expr":"(dot($(value), vec3(1.0))/3.0)" }
],
"color":{ "r":1.0, "g":0.0, "b":1.0, "a":1.0 }
},
{
"name":"v4v4",
"label":"V4->V4",
"type":"vec4",
"paramdefs":"vec4 p",
"params":"p",
"slot_type":4,
"color":{ "r":0.6, "g":0.4, "b":0.1, "a":1.0 }
},
{
"name":"any",
"slot_type":42,
"color":{ "r":1.0, "g":1.0, "b":1.0, "a":1.0 }
}
]

View File

@ -1,85 +0,0 @@
{
"name": "magnify",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"cx": 0,
"cy": 0,
"scale": 1.98
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4($uv, 0.0, 1.0)",
"label": "",
"longdesc": "The input image to be transformed",
"name": "i",
"shortdesc": "Input",
"type": "rgba"
},
{
"default": "max(1.0-2.0*length($uv-vec2(0.5)), 0.0)",
"label": "",
"longdesc": "The magnifying glass shape",
"name": "s",
"shortdesc": "Shape",
"type": "f"
}
],
"instance": "",
"longdesc": "Magnifying glass effect",
"name": "Magnify",
"outputs": [
{
"longdesc": "Shows the transformed image",
"rgba": "$i(vec2($cx+0.5, $cy+0.5)+($uv-vec2($cx+0.5, $cy+0.5))/mix(1.0, $scale, $s($uv-vec2($cx, $cy))))",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"control": "P1.x",
"default": 0,
"label": "Center X:",
"longdesc": "X coordinate of the magnifying glass center",
"max": 0.5,
"min": -0.5,
"name": "cx",
"shortdesc": "center.x",
"step": 0.01,
"type": "float"
},
{
"control": "P1.y",
"default": 0,
"label": "Center Y:",
"longdesc": "Y coordinate of the magnifying glass center",
"max": 0.5,
"min": -0.5,
"name": "cy",
"shortdesc": "center.y",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Scale:",
"longdesc": "The maximum scaling factor for the magnifying glass",
"max": 10,
"min": 0,
"name": "scale",
"shortdesc": "Scale",
"step": 0.005,
"type": "float"
}
],
"shortdesc": "Magnify"
},
"type": "shader"
}

View File

@ -1,51 +0,0 @@
{
"name": "make_tileable",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"w": 0.1
},
"shader_model": {
"code": "",
"longdesc": "Creates a tileable version of its input image by moving different parts around to hide seams.",
"global": "",
"inputs": [
{
"default": "vec4(1.0)",
"function": true,
"label": "",
"longdesc": "The image to be made tileable",
"name": "in",
"shortdesc": "Input",
"type": "rgba"
}
],
"instance": "vec4 make_tileable_$(name)(vec2 uv, float w) {\n\tvec4 a = $in(uv);\n\tvec4 b = $in(fract(uv+vec2(0.5)));\n\tfloat coef_ab = sin(1.57079632679*clamp((length(uv-vec2(0.5))-0.5+w)/w, 0.0, 1.0));\n\tvec4 c = $in(fract(uv+vec2(0.25)));\n\tfloat coef_abc = sin(1.57079632679*clamp((min(min(length(uv-vec2(0.0, 0.5)), length(uv-vec2(0.5, 0.0))), min(length(uv-vec2(1.0, 0.5)), length(uv-vec2(0.5, 1.0))))-w)/w, 0.0, 1.0));\n\treturn mix(c, mix(a, b, coef_ab), coef_abc);\n}\n",
"name": "Make Tileable",
"outputs": [
{
"longdesc": "A tileable version of the input image",
"rgba": "make_tileable_$(name)($uv, 0.5*$w)",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"control": "None",
"default": 0.1,
"label": "",
"longdesc": "Width of the transition areas between parts of the input image",
"max": 0.25,
"min": 0,
"name": "w",
"shortdesc": "Width",
"step": 0.01,
"type": "float"
}
]
},
"type": "shader"
}

View File

@ -1,172 +0,0 @@
{
"name": "math",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"clamp": false,
"default_in1": 0,
"default_in2": 0,
"op": 0
},
"shader_model": {
"code": "float $(name_uv)_clamp_false = $op;\nfloat $(name_uv)_clamp_true = clamp($(name_uv)_clamp_false, 0.0, 1.0);\n",
"global": "",
"inputs": [
{
"default": "$default_in1",
"label": "2:A",
"longdesc": "The A operand",
"name": "in1",
"shortdesc": "A",
"type": "f"
},
{
"default": "$default_in2",
"label": "B",
"longdesc": "The B operand",
"name": "in2",
"shortdesc": "B",
"type": "f"
}
],
"instance": "",
"longdesc": "Performs a math operation using its inputs or parameter values",
"name": "Math",
"outputs": [
{
"f": "$(name_uv)_clamp_$clamp",
"longdesc": "Shows a greyscale image of the result",
"shortdesc": "Output",
"type": "f"
}
],
"parameters": [
{
"default": 19,
"label": "",
"longdesc": "The operation to be performed",
"name": "op",
"shortdesc": "Operation",
"type": "enum",
"values": [
{
"name": "A+B",
"value": "$in1($uv)+$in2($uv)"
},
{
"name": "A-B",
"value": "$in1($uv)-$in2($uv)"
},
{
"name": "A*B",
"value": "$in1($uv)*$in2($uv)"
},
{
"name": "A/B",
"value": "$in1($uv)/$in2($uv)"
},
{
"name": "log(A)",
"value": "log($in1($uv))"
},
{
"name": "log2(A)",
"value": "log2($in1($uv))"
},
{
"name": "pow(A, B)",
"value": "pow($in1($uv),$in2($uv))"
},
{
"name": "abs(A)",
"value": "abs($in1($uv))"
},
{
"name": "round(A)",
"value": "round($in1($uv))"
},
{
"name": "floor(A)",
"value": "floor($in1($uv))"
},
{
"name": "ceil(A)",
"value": "ceil($in1($uv))"
},
{
"name": "trunc(A)",
"value": "trunc($in1($uv))"
},
{
"name": "fract(A)",
"value": "fract($in1($uv))"
},
{
"name": "min(A, B)",
"value": "min($in1($uv),$in2($uv))"
},
{
"name": "max(A, B)",
"value": "max($in1($uv),$in2($uv))"
},
{
"name": "A<B",
"value": "step($in1($uv),$in2($uv))"
},
{
"name": "cos(A*B)",
"value": "cos($in1($uv)*$in2($uv))"
},
{
"name": "sin(A*B)",
"value": "sin($in1($uv)*$in2($uv))"
},
{
"name": "tan(A*B)",
"value": "tan($in1($uv)*$in2($uv))"
},
{
"name": "sqrt(1-A²)",
"value": "sqrt(1.0-$in1($uv)*$in1($uv))"
}
]
},
{
"control": "None",
"default": 0,
"label": "",
"longdesc": "The default value for A, used if the corresponding input is not connected",
"max": 1,
"min": 0,
"name": "default_in1",
"shortdesc": "Default A",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0,
"label": "",
"longdesc": "The default value for B, used if the corresponding input is not connected",
"max": 1,
"min": 0,
"name": "default_in2",
"shortdesc": "Default B",
"step": 0.01,
"type": "float"
},
{
"default": false,
"label": "Clamp result",
"longdesc": "The result is clamped to [0, 1] if this option is checked",
"name": "clamp",
"shortdesc": "Clamp",
"type": "boolean"
}
],
"shortdesc": "Math"
},
"type": "shader"
}

View File

@ -1,216 +0,0 @@
{
"name": "math_v3",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"clamp": false,
"d_in1_x": 0,
"d_in1_y": 0,
"d_in1_z": 0,
"d_in2_x": 0,
"d_in2_y": 0,
"d_in2_z": 0,
"op": 19
},
"shader_model": {
"code": "vec3 $(name_uv)_clamp_false = $op;\nvec3 $(name_uv)_clamp_true = clamp($(name_uv)_clamp_false, vec3(0.0), vec3(1.0));\n",
"global": "",
"inputs": [
{
"default": "vec3($d_in1_x, $d_in1_y, $d_in1_z)",
"label": "2:A",
"longdesc": "The A operand",
"name": "in1",
"shortdesc": "A",
"type": "rgb"
},
{
"default": "vec3($d_in2_x, $d_in2_y, $d_in2_z)",
"label": "B",
"longdesc": "The B operand",
"name": "in2",
"shortdesc": "B",
"type": "rgb"
}
],
"instance": "",
"longdesc": "Performs a math operation using its inputs or parameter values",
"name": "Vec3 Math",
"outputs": [
{
"longdesc": "Shows a greyscale image of the result",
"rgb": "$(name_uv)_clamp_$clamp",
"shortdesc": "Output",
"type": "rgb"
}
],
"parameters": [
{
"default": 19,
"label": "",
"longdesc": "The operation to be performed",
"name": "op",
"shortdesc": "Operation",
"type": "enum",
"values": [
{
"name": "A+B",
"value": "$in1($uv)+$in2($uv)"
},
{
"name": "A-B",
"value": "$in1($uv)-$in2($uv)"
},
{
"name": "A*B",
"value": "$in1($uv)*$in2($uv)"
},
{
"name": "A/B",
"value": "$in1($uv)/$in2($uv)"
},
{
"name": "log(A)",
"value": "log($in1($uv))"
},
{
"name": "log2(A)",
"value": "log2($in1($uv))"
},
{
"name": "pow(A, B)",
"value": "pow($in1($uv),$in2($uv))"
},
{
"name": "abs(A)",
"value": "abs($in1($uv))"
},
{
"name": "round(A)",
"value": "round($in1($uv))"
},
{
"name": "floor(A)",
"value": "floor($in1($uv))"
},
{
"name": "ceil(A)",
"value": "ceil($in1($uv))"
},
{
"name": "trunc(A)",
"value": "trunc($in1($uv))"
},
{
"name": "fract(A)",
"value": "fract($in1($uv))"
},
{
"name": "min(A, B)",
"value": "min($in1($uv),$in2($uv))"
},
{
"name": "max(A, B)",
"value": "max($in1($uv),$in2($uv))"
},
{
"name": "A<B",
"value": "step($in1($uv),$in2($uv))"
},
{
"name": "cos(A*B)",
"value": "cos($in1($uv)*$in2($uv))"
},
{
"name": "sin(A*B)",
"value": "sin($in1($uv)*$in2($uv))"
},
{
"name": "tan(A*B)",
"value": "tan($in1($uv)*$in2($uv))"
},
{
"name": "sqrt(1-A²)",
"value": "sqrt(vec3(1.0)-$in1($uv)*$in1($uv))"
}
]
},
{
"control": "None",
"default": 0,
"label": "",
"longdesc": "The default value for A, used if the corresponding input is not connected",
"max": 1,
"min": 0,
"name": "d_in1_x",
"shortdesc": "Default A",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0,
"label": "2:",
"longdesc": "The default value for B, used if the corresponding input is not connected",
"max": 1,
"min": 0,
"name": "d_in1_y",
"shortdesc": "Default B",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0,
"label": "2:",
"max": 1,
"min": 0,
"name": "d_in1_z",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0,
"label": "",
"max": 1,
"min": 0,
"name": "d_in2_x",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0,
"label": "3:",
"max": 1,
"min": 0,
"name": "d_in2_y",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0,
"label": "3:",
"max": 1,
"min": 0,
"name": "d_in2_z",
"step": 0.01,
"type": "float"
},
{
"default": false,
"label": "Clamp result",
"longdesc": "The result is clamped to [0, 1] if this option is checked",
"name": "clamp",
"shortdesc": "Clamp",
"type": "boolean"
}
],
"shortdesc": "Math"
},
"type": "shader"
}

View File

@ -1,53 +0,0 @@
{
"name": "morphology",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"d": 0.15,
"s": 9
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "0.0",
"function": true,
"label": "",
"name": "in",
"type": "f"
}
],
"instance": "float $(name)_dilate(vec2 uv) {\n\tfloat e = 1.0/$s;\n\tfloat dx = min(25.0, floor($d/e))*e;\n\tfloat v = 0.0;\n\tfor (float x = -dx; x <= dx; x += e) {\n\t\tfloat dy = min(25.0*e, sqrt(dx*dx-x*x));\n\t\tfor (float y = -dy; y <= dy; y += e) {\n\t\t\tv = max(v, $in(uv+vec2(x, y)));\n\t\t}\n\t}\n\treturn v;\n}",
"name": "Morphology Dilation",
"outputs": [
{
"f": "$(name)_dilate($uv)",
"type": "f"
}
],
"parameters": [
{
"default": 9,
"first": 6,
"label": "",
"last": 12,
"name": "s",
"type": "size"
},
{
"control": "None",
"default": 0.1,
"label": "",
"max": 0.3,
"min": 0,
"name": "d",
"step": 0.01,
"type": "float"
}
]
},
"type": "shader"
}

View File

@ -1,60 +0,0 @@
{
"name": "mul_detect",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"t": 0.01,
"v": 0.5
},
"shader_model": {
"code": "float $(name_uv)_d = ($in($uv)-$v)/$t;",
"global": "",
"inputs": [
{
"default": "1.0",
"label": "",
"name": "mul",
"type": "f"
},
{
"default": "0.0",
"label": "",
"name": "in",
"type": "f"
}
],
"instance": "",
"name": "MulDetect",
"outputs": [
{
"f": "$mul($uv)*clamp(1.0-$(name_uv)_d*$(name_uv)_d, 0.0, 1.0)",
"type": "f"
}
],
"parameters": [
{
"control": "None",
"default": 0.5,
"label": "Value",
"max": 1,
"min": 0,
"name": "v",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0.1,
"label": "Tolerance",
"max": 1,
"min": 0.01,
"name": "t",
"step": 0.001,
"type": "float"
}
]
},
"type": "shader"
}

View File

@ -1,47 +0,0 @@
{
"name": "multigradient",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"count": 10
},
"shader_model": {
"code": "",
"global": "float multigradient(vec2 uv, int count, float seed) {\n\tfloat rv = 1.0;\n\tfloat angle = 0.0;\n\tfor (int i = 0; i < count; ++i) {\n\t\tangle = rand(vec2(seed, angle))*6.28;\n\t\tfloat v = 0.5+(cos(angle)*(uv.x-0.5)+sin(angle)*(uv.y-0.5))/(cos(abs(mod(angle, 0.5*3.141592)-0.25*3.141592))*1.41421356237);\n\t\trv = min(rv, v);\n\t}\n\treturn rv;\n}",
"inputs": [
{
"default": "vec3($uv, 0.0)",
"label": "",
"name": "in",
"type": "rgb"
}
],
"instance": "",
"name": "MultiGradient",
"outputs": [
{
"f": "multigradient($in($uv).xy, int($count), float($seed)+$in($uv).z)",
"longdesc": "An image showing the gradient",
"shortdesc": "Output",
"type": "f"
}
],
"parameters": [
{
"control": "None",
"default": 1,
"label": "",
"longdesc": "Number of repetitions of the gradient",
"max": 32,
"min": 1,
"name": "count",
"shortdesc": "Repeat",
"step": 1,
"type": "float"
}
]
},
"type": "shader"
}

View File

@ -1,83 +0,0 @@
{
"name": "noise_anisotropic",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"interpolation": 1,
"scale_x": 4,
"scale_y": 256,
"smoothness": 1
},
"shader_model": {
"code": "",
"global": "float anisotropic(vec2 uv, vec2 size, float seed, float smoothness, float interpolation) {\n\tvec2 seed2 = rand2(vec2(seed, 1.0-seed));\n\t\n\tvec2 xy = floor(uv*size);\n\tvec2 offset = vec2(rand(seed2 + xy.y), 0.0);\n\tvec2 xy_offset = floor(uv * size + offset );\n float f0 = rand(seed2+mod(xy_offset, size));\n float f1 = rand(seed2+mod(xy_offset+vec2(1.0, 0.0), size));\n\tfloat mixer = clamp( (fract(uv.x*size.x+offset.x) -.5) / smoothness + 0.5, 0.0, 1.0 );\n float smooth_mix = smoothstep(0.0, 1.0, mixer);\n\tfloat linear = mix(f0, f1, mixer);\n\tfloat smoothed = mix(f0, f1, smooth_mix);\n\t\n return mix(linear, smoothed, interpolation);\n}\n",
"inputs": [
],
"instance": "",
"longdesc": "Generates x-axis interpolated value noise",
"name": "Anisotropic Noise",
"outputs": [
{
"f": "anisotropic($(uv), vec2($(scale_x), $(scale_y)), $(seed), $(smoothness), $(interpolation))",
"longdesc": "Shows a greyscale value noise",
"shortdesc": "Output",
"type": "f"
}
],
"parameters": [
{
"control": "None",
"default": 4,
"label": "Scale X",
"longdesc": "The scale along the X axis",
"max": 32,
"min": 1,
"name": "scale_x",
"shortdesc": "Scale.x",
"step": 1,
"type": "float"
},
{
"control": "None",
"default": 256,
"label": "Scale Y",
"longdesc": "The scale along the Y axis",
"max": 1024,
"min": 1,
"name": "scale_y",
"shortdesc": "Scale.y",
"step": 1,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Smoothness",
"longdesc": "Controls how much the noise is blurred along the x-axis",
"max": 1,
"min": 0,
"name": "smoothness",
"shortdesc": "Smoothness",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Interpolation",
"longdesc": "Controls the type of interpolation used for the smoothing. 0 is linear interpolation, 1 is smooth interpolation",
"max": 1,
"min": 0,
"name": "interpolation",
"shortdesc": "Interpolation",
"step": 0.01,
"type": "float"
}
],
"shortdesc": "Anisotropic Noise"
},
"type": "shader"
}

View File

@ -1,279 +0,0 @@
{
"connections": [
{
"from": "gen_inputs",
"from_port": 0,
"to": "buffer",
"to_port": 0
},
{
"from": "buffer",
"from_port": 0,
"to": "switch",
"to_port": 1
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "switch",
"to_port": 0
},
{
"from": "edge_detect_1",
"from_port": 0,
"to": "gen_outputs",
"to_port": 0
},
{
"from": "switch",
"from_port": 0,
"to": "edge_detect_1",
"to_port": 0
}
],
"label": "Normal Map",
"longdesc": "Generates a normal map from a height map",
"name": "normal_map",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"name": "buffer",
"node_position": {
"x": -695.663818,
"y": 34.60614
},
"parameters": {
"lod": 0,
"size": 10
},
"type": "buffer"
},
{
"name": "gen_parameters",
"node_position": {
"x": -731.910156,
"y": -131.916687
},
"parameters": {
"param0": 10,
"param1": 1,
"param2": 0,
"param4": 1
},
"type": "remote",
"widgets": [
{
"label": "",
"linked_widgets": [
{
"node": "edge_detect_1",
"widget": "format"
}
],
"longdesc": "The format of the generated normal map\nIn most cases this should be set to default",
"name": "param2",
"shortdesc": "Format",
"type": "linked_control"
},
{
"label": "",
"linked_widgets": [
{
"node": "buffer",
"widget": "size"
},
{
"node": "edge_detect_1",
"widget": "size"
}
],
"longdesc": "The resolution of the generated normal map",
"name": "param0",
"shortdesc": "Resolution",
"type": "linked_control"
},
{
"label": "",
"linked_widgets": [
{
"node": "edge_detect_1",
"widget": "amount"
}
],
"longdesc": "The strength of the normal map filter",
"name": "param1",
"shortdesc": "Strength",
"type": "linked_control"
},
{
"configurations": {
"False": [
{
"node": "switch",
"value": 0,
"widget": "source"
}
],
"True": [
{
"node": "switch",
"value": 1,
"widget": "source"
}
]
},
"label": "Buffer",
"linked_widgets": [
{
"node": "switch",
"widget": "source"
}
],
"longdesc": "When set, a buffer is used to sample the input before the normal map filter",
"name": "param4",
"shortdesc": "Buffer",
"type": "config_control"
}
]
},
{
"name": "gen_outputs",
"node_position": {
"x": -445.663818,
"y": 75.047363
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "Shows the generated normal map",
"name": "Normal",
"shortdesc": "Output",
"type": "rgb"
}
],
"type": "ios"
},
{
"name": "gen_inputs",
"node_position": {
"x": -1094.910156,
"y": 74.047363
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The input height map",
"name": "Bump",
"shortdesc": "Input",
"type": "f"
}
],
"seed_value": 12483,
"type": "ios"
},
{
"name": "switch",
"node_position": {
"x": -673.5,
"y": 113.297363
},
"parameters": {
"choices": 2,
"outputs": 1,
"source": 1
},
"type": "switch"
},
{
"name": "edge_detect_1",
"node_position": {
"x": -676.092529,
"y": 193.868774
},
"parameters": {
"amount": 1,
"format": 0,
"size": 10
},
"shader_model": {
"code": "",
"global": "vec3 process_normal_default(vec3 v, float multiplier) {\n\treturn 0.5*normalize(v.xyz*multiplier+vec3(0.0, 0.0, -1.0))+vec3(0.5);\n}\n\nvec3 process_normal_opengl(vec3 v, float multiplier) {\n\treturn 0.5*normalize(v.xyz*multiplier+vec3(0.0, 0.0, 1.0))+vec3(0.5);\n}\n\nvec3 process_normal_directx(vec3 v, float multiplier) {\n\treturn 0.5*normalize(v.xyz*vec3(1.0, -1.0, 1.0)*multiplier+vec3(0.0, 0.0, 1.0))+vec3(0.5);\n}\n",
"inputs": [
{
"default": "0.0",
"function": true,
"label": "",
"name": "in",
"type": "f"
}
],
"instance": "vec3 $(name)_fct(vec2 uv) {\n\tvec3 e = vec3(1.0/$size, -1.0/$size, 0);\n\tvec2 rv = vec2(1.0, -1.0)*$in(uv+e.xy);\n\trv += vec2(-1.0, 1.0)*$in(uv-e.xy);\n\trv += vec2(1.0, 1.0)*$in(uv+e.xx);\n\trv += vec2(-1.0, -1.0)*$in(uv-e.xx);\n\trv += vec2(2.0, 0.0)*$in(uv+e.xz);\n\trv += vec2(-2.0, 0.0)*$in(uv-e.xz);\n\trv += vec2(0.0, 2.0)*$in(uv+e.zx);\n\trv += vec2(0.0, -2.0)*$in(uv-e.zx);\n\treturn vec3(rv, 0.0);\n}",
"name": "Normal map",
"outputs": [
{
"rgb": "process_normal_$format($(name)_fct($uv), $amount*$size/128.0)",
"type": "rgb"
}
],
"parameters": [
{
"default": 0,
"label": "",
"name": "format",
"type": "enum",
"values": [
{
"name": "Default",
"value": "default"
},
{
"name": "OpenGL",
"value": "opengl"
},
{
"name": "DirectX",
"value": "directx"
}
]
},
{
"default": 9,
"first": 4,
"label": "",
"last": 12,
"name": "size",
"type": "size"
},
{
"control": "None",
"default": 0.5,
"label": "",
"max": 2,
"min": 0,
"name": "amount",
"step": 0.01,
"type": "float"
}
]
},
"type": "shader"
}
],
"parameters": {
"param0": 10,
"param1": 1,
"param2": 0,
"param4": 1
},
"shortdesc": "Normal map",
"type": "graph"
}

View File

@ -1,300 +0,0 @@
{
"connections": [
{
"from": "gen_inputs",
"from_port": 0,
"to": "buffer",
"to_port": 0
},
{
"from": "blend",
"from_port": 0,
"to": "colorize",
"to_port": 0
},
{
"from": "buffer",
"from_port": 0,
"to": "blend",
"to_port": 0
},
{
"from": "colorize",
"from_port": 0,
"to": "_2",
"to_port": 0
},
{
"from": "_2",
"from_port": 0,
"to": "gen_outputs",
"to_port": 0
},
{
"from": "buffer",
"from_port": 0,
"to": "gaussian_blur_x",
"to_port": 0
},
{
"from": "gaussian_blur_x",
"from_port": 0,
"to": "buffer_2",
"to_port": 0
},
{
"from": "buffer_2",
"from_port": 0,
"to": "gaussian_blur_y",
"to_port": 0
},
{
"from": "gaussian_blur_y",
"from_port": 0,
"to": "blend",
"to_port": 1
}
],
"label": "Occlusion",
"longdesc": "Generates an ambient occlusion map from a height map",
"name": "occlusion",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"name": "buffer_2",
"node_position": {
"x": -409.875,
"y": -112.625
},
"parameters": {
"lod": 0,
"size": 8
},
"seed_value": 61344,
"type": "buffer"
},
{
"name": "buffer",
"node_position": {
"x": -408.25,
"y": -265.75
},
"parameters": {
"lod": 0,
"size": 8
},
"seed_value": 53030,
"type": "buffer"
},
{
"name": "gen_parameters",
"node_position": {
"x": -463.666626,
"y": -384.666656
},
"parameters": {
"param0": 8,
"param2": 1.5
},
"type": "remote",
"widgets": [
{
"label": "Grid size:",
"linked_widgets": [
{
"node": "buffer",
"widget": "size"
},
{
"node": "buffer_2",
"widget": "size"
},
{
"node": "gaussian_blur_x",
"widget": "size"
},
{
"node": "gaussian_blur_y",
"widget": "size"
}
],
"longdesc": "The resolution of the input height map",
"name": "param0",
"shortdesc": "Size",
"type": "linked_control"
},
{
"label": "Strength",
"linked_widgets": [
{
"node": "_2",
"widget": "g"
}
],
"longdesc": "The strength of the occlusion map effect",
"name": "param2",
"shortdesc": "Strength",
"type": "linked_control"
}
]
},
{
"name": "gen_inputs",
"node_position": {
"x": -824.666626,
"y": -116.392853
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The input heightmap",
"name": "port0",
"shortdesc": "Input",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_outputs",
"node_position": {
"x": 33.547607,
"y": -132.392853
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The generated occlusion map",
"name": "port0",
"shortdesc": "Output",
"type": "f"
}
],
"type": "ios"
},
{
"name": "blend",
"node_position": {
"x": -422.79895,
"y": 63.16272
},
"parameters": {
"amount": 1,
"blend_type": 11
},
"type": "blend"
},
{
"name": "colorize",
"node_position": {
"x": -167.79895,
"y": -178.83728
},
"parameters": {
"gradient": {
"interpolation": 1,
"points": [
{
"a": 1,
"b": 1,
"g": 1,
"pos": 0,
"r": 1
},
{
"a": 1,
"b": 0,
"g": 0,
"pos": 1,
"r": 0
}
],
"type": "Gradient"
}
},
"seed_value": 33856,
"type": "colorize"
},
{
"name": "_2",
"node_position": {
"x": -145.403687,
"y": -112.29187
},
"parameters": {
"g": 1.5
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "0.0",
"label": "",
"name": "in",
"type": "f"
}
],
"instance": "",
"name": "",
"outputs": [
{
"f": "pow($in($uv), $g)",
"type": "f"
}
],
"parameters": [
{
"default": 1,
"label": "",
"max": 2,
"min": 0,
"name": "g",
"step": 0.1,
"type": "float"
}
]
},
"type": "shader"
},
{
"name": "gaussian_blur_x",
"node_position": {
"x": -413.053711,
"y": -189.016876
},
"parameters": {
"sigma": 50,
"size": 8
},
"type": "gaussian_blur_x"
},
{
"name": "gaussian_blur_y",
"node_position": {
"x": -405.053711,
"y": -21.016876
},
"parameters": {
"sigma": 50,
"size": 8
},
"type": "gaussian_blur_y"
}
],
"parameters": {
"param0": 8,
"param2": 1.5
},
"shortdesc": "Occlusion",
"type": "graph"
}

View File

@ -1,440 +0,0 @@
{
"connections": [
{
"from": "colorize",
"from_port": 0,
"to": "_2",
"to_port": 0
},
{
"from": "_2",
"from_port": 0,
"to": "gen_outputs",
"to_port": 0
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "fast_blur",
"to_port": 0
},
{
"from": "fast_blur",
"from_port": 0,
"to": "blend",
"to_port": 1
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "blend",
"to_port": 0
},
{
"from": "blend",
"from_port": 0,
"to": "colorize",
"to_port": 0
}
],
"label": "Occlusion",
"longdesc": "Generates an ambient occlusion map from a height map",
"name": "occlusion2",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"name": "gen_parameters",
"node_position": {
"x": -522.866638,
"y": -383.867035
},
"parameters": {
"param0": 11,
"param1": 20,
"param2": 1.5,
"param3": 1
},
"type": "remote",
"widgets": [
{
"label": "Resolution",
"linked_widgets": [
{
"node": "fast_blur",
"widget": "param0"
}
],
"longdesc": "The resolution of the input height map",
"name": "param0",
"shortdesc": "Resolution",
"type": "linked_control"
},
{
"label": "Strength",
"linked_widgets": [
{
"node": "_2",
"widget": "g"
}
],
"longdesc": "The strength of the occlusion map effect",
"name": "param2",
"shortdesc": "Strength",
"type": "linked_control"
},
{
"label": "Radius",
"linked_widgets": [
{
"node": "fast_blur",
"widget": "param1"
}
],
"longdesc": "The radius of the blur used for the occlusion effect",
"name": "param1",
"shortdesc": "Radius",
"type": "linked_control"
},
{
"label": "Quality",
"linked_widgets": [
{
"node": "fast_blur",
"widget": "param2"
}
],
"longdesc": "The quality of the blur operation used for the occlusion effect",
"name": "param3",
"shortdesc": "Quality",
"type": "linked_control"
}
]
},
{
"name": "gen_inputs",
"node_position": {
"x": -842.266602,
"y": -108.396729
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The input heightmap",
"name": "port0",
"shortdesc": "Input",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_outputs",
"node_position": {
"x": 77.5476,
"y": -86.015305
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The generated occlusion map",
"name": "port0",
"shortdesc": "Output",
"type": "f"
}
],
"type": "ios"
},
{
"name": "blend",
"node_position": {
"x": -422.79895,
"y": 11.18788
},
"parameters": {
"amount": 1,
"blend_type": 11
},
"type": "blend"
},
{
"name": "colorize",
"node_position": {
"x": -124.598953,
"y": -131.660126
},
"parameters": {
"gradient": {
"interpolation": 1,
"points": [
{
"a": 1,
"b": 1,
"g": 1,
"pos": 0,
"r": 1
},
{
"a": 1,
"b": 0,
"g": 0,
"pos": 1,
"r": 0
}
],
"type": "Gradient"
}
},
"seed_value": 33856,
"type": "colorize"
},
{
"name": "_2",
"node_position": {
"x": -104.603699,
"y": -57.918201
},
"parameters": {
"g": 1.5
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "0.0",
"label": "",
"name": "in",
"type": "f"
}
],
"instance": "",
"name": "",
"outputs": [
{
"f": "pow($in(fract($uv)), $g)",
"type": "f"
}
],
"parameters": [
{
"control": "None",
"default": 1,
"label": "",
"max": 2,
"min": 0,
"name": "g",
"step": 0.1,
"type": "float"
}
]
},
"type": "shader"
},
{
"connections": [
{
"from": "buffer_2",
"from_port": 0,
"to": "fast_blur_shader",
"to_port": 0
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "buffer_2",
"to_port": 0
},
{
"from": "fast_blur_shader",
"from_port": 0,
"to": "gen_outputs",
"to_port": 0
}
],
"label": "Fast Blur",
"longdesc": "",
"name": "fast_blur",
"node_position": {
"x": -435.552002,
"y": -135.436234
},
"nodes": [
{
"name": "fast_blur_shader",
"node_position": {
"x": -161.600006,
"y": 143.188766
},
"parameters": {
"quality": 1,
"sigma": 20
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4(1.0)",
"function": true,
"label": "",
"name": "in",
"type": "rgba"
}
],
"instance": "vec4 $(name)_blur(vec2 uv, vec2 scale, float sigma, int quality) {\n vec4 O = vec4(0.0);\n\tfloat samples = sigma * 4.0; \n\tint LOD = max(0, int(log2(float(samples)))-quality-2);\n\tint sLOD = 1 << LOD;\n int s = max(1, int(samples/float(sLOD)));\n\tfloat sum = 0.0;\n for (int i = 0; i < s*s; i++) {\n vec2 d = vec2(float(i%s), float(i/s))*float(sLOD) - 0.5*float(samples);\n\t\tvec2 dd = d / sigma;\n\t\tfloat g = exp(-.5*dot(dd,dd))/(6.28*sigma*sigma);\n O += g * textureLod($in.texture, uv + scale * d, float(LOD));\n\t\tsum += g;\n }\n \n return O / sum;\n}\n",
"name": "Fast Blur",
"outputs": [
{
"rgba": "$(name)_blur($uv, vec2(1.0)/$in.size, max(1.0, floor($sigma*$in.size/2048.0)), int($quality))",
"type": "rgba"
}
],
"parameters": [
{
"control": "None",
"default": 1,
"label": "",
"max": 256,
"min": 1,
"name": "sigma",
"step": 1,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "",
"max": 3,
"min": 0,
"name": "quality",
"step": 1,
"type": "float"
}
]
},
"type": "shader"
},
{
"name": "buffer_2",
"node_position": {
"x": -187,
"y": 61.5
},
"parameters": {
"size": 11
},
"type": "buffer",
"version": 1
},
{
"name": "gen_inputs",
"node_position": {
"x": -602,
"y": 91.75
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"name": "port0",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_outputs",
"node_position": {
"x": 88,
"y": 61.75
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"name": "port0",
"type": "rgba"
}
],
"type": "ios"
},
{
"name": "gen_parameters",
"node_position": {
"x": -254.5,
"y": -122.5
},
"parameters": {
"param0": 11,
"param1": 20,
"param2": 1
},
"type": "remote",
"widgets": [
{
"label": "Resolution",
"linked_widgets": [
{
"node": "buffer_2",
"widget": "size"
}
],
"name": "param0",
"type": "linked_control"
},
{
"label": "Sigma",
"linked_widgets": [
{
"node": "fast_blur_shader",
"widget": "sigma"
}
],
"name": "param1",
"type": "linked_control"
},
{
"label": "Quality",
"linked_widgets": [
{
"node": "fast_blur_shader",
"widget": "quality"
}
],
"name": "param2",
"type": "linked_control"
}
]
}
],
"parameters": {
"param0": 11,
"param1": 20,
"param2": 1
},
"shortdesc": "",
"type": "graph"
}
],
"parameters": {
"param0": 11,
"param1": 20,
"param2": 1.5,
"param3": 1
},
"shortdesc": "Occlusion",
"type": "graph"
}

View File

@ -1,50 +0,0 @@
{
"name": "optional",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"d": {
"a": 0,
"b": 0,
"g": 0,
"r": 0,
"type": "Color"
}
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "$d",
"label": "",
"name": "in",
"type": "rgba"
}
],
"instance": "",
"name": "Optional",
"outputs": [
{
"rgba": "$in($uv)",
"type": "rgba"
}
],
"parameters": [
{
"default": {
"a": 0,
"b": 0,
"g": 0,
"r": 0
},
"label": "",
"name": "d",
"type": "color"
}
]
},
"type": "shader"
}

View File

@ -1,89 +0,0 @@
{
"name": "pixelize",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"c": 8,
"d": 0.5,
"x": 16,
"y": 16
},
"shader_model": {
"code": "vec2 $(name_uv)_uv = floor(($uv*vec2($x, $y)))+vec2(0.5);\nvec3 $(name_uv)_dither = fract(vec3(dot(vec2(171.0, 231.0), $(name_uv)_uv))/vec3(103.0, 71.0, 97.0));\n",
"global": "",
"inputs": [
{
"default": "vec3(1.0)",
"label": "",
"longdesc": "The image to be pixelated",
"name": "i",
"shortdesc": "Input",
"type": "rgb"
}
],
"instance": "",
"longdesc": "Creates a pixelated image from its input, and also quantifies the colors with optional dithering.",
"name": "Pixelize",
"outputs": [
{
"longdesc": "A pixelated version of the input image",
"rgb": "floor($i($(name_uv)_uv/vec2($x, $y))*$c+$d*($(name_uv)_dither-vec3(0.5)))/$c",
"shortdesc": "Output",
"type": "rgb"
}
],
"parameters": [
{
"control": "None",
"default": 4,
"label": "Columns:",
"longdesc": "Number of pixel columns of the output",
"max": 256,
"min": 1,
"name": "x",
"shortdesc": "Columns",
"step": 1,
"type": "float"
},
{
"control": "None",
"default": 4,
"label": "Rows:",
"longdesc": "Number of pixel rows of the output",
"max": 256,
"min": 1,
"name": "y",
"shortdesc": "Rows",
"step": 1,
"type": "float"
},
{
"control": "None",
"default": 4,
"label": "Levels:",
"longdesc": "Number of color levels for each channel",
"max": 32,
"min": 2,
"name": "c",
"shortdesc": "Levels",
"step": 1,
"type": "float"
},
{
"control": "None",
"default": 0.5,
"label": "Dither:",
"longdesc": "Amount of dithering in the output image",
"max": 1,
"min": 0,
"name": "d",
"shortdesc": "Dithering",
"step": 0.01,
"type": "float"
}
]
},
"type": "shader"
}

View File

@ -1,137 +0,0 @@
{
"name": "polycurve",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"curve": {
"points": [
{
"x": 0.771812,
"y": 0.319911
},
{
"x": 0.838926,
"y": 0.550335
},
{
"x": 0.624161,
"y": 0.888143
},
{
"x": 0.288591,
"y": 0.856823
},
{
"x": 0.0783,
"y": 0.615213
},
{
"x": 0.114094,
"y": 0.346757
},
{
"x": 0.362416,
"y": 0.185682
}
],
"type": "Polygon"
},
"ends": true,
"repeat": 3,
"width": 0.2
},
"seed": 0,
"seed_locked": false,
"shader_model": {
"code": "",
"global": "vec2 curve(float t, vec2 a, vec2 b, vec2 c, vec2 d) {\n vec2 bc = c-b;\n vec2 da = a-d;\n return (b+0.5*t*(bc+b-a+t*(a-b+bc+t*3.0*(bc*3.0+da+t*5.0/3.0*(-bc*3.0-da+t*0.4*(bc*3.0+da))))));\n}\n\nvec2 dcurve(float t, vec2 a, vec2 b, vec2 c, vec2 d) {\n\treturn (curve(t+0.0001, a, b, c, d)-curve(t, a, b, c, d))/0.0001;\n}\nvec2 solve_cubic(vec2 uv, vec2 a, vec2 b, vec2 c, vec2 d) {\n\tfloat t = 0.5;\n\tvec2 pos, dv;\n\tfloat current_sign = 0.0;\n\tfloat dt = 1.0;\n\tfor (int i = 0; i < 20; ++i) {\n\t\tpos = curve(t, a, b, c, d);\n\t\tdv = dcurve(t, a, b, c, d);\n\t\tfloat new_sign = sign(dot(normalize(uv - pos), dv));\n\t\tif (new_sign != current_sign) {\n\t\t\tcurrent_sign = new_sign;\n\t\t\tdt *= 0.5;\n\t\t}\n t += dt*current_sign;\n\t}\n t = clamp(t, 0.0, 1.0);\n\treturn vec2(t, length(uv-curve(t, a, b, c, d)));\n}\n",
"inputs": [
{
"default": "vec4(vec3(step(abs($uv.y-0.5), 0.4999)), 1.0)",
"label": "",
"longdesc": "Input pattern to be drawn along the curve",
"name": "in",
"shortdesc": "Pattern",
"type": "rgba"
},
{
"default": "1.0",
"function": true,
"label": "",
"longdesc": "A map that describes the width along the curve (use a Tonality node)",
"name": "width_map",
"shortdesc": "Width map",
"type": "f"
}
],
"instance": "vec2 bezier_uv_$name(vec2 uv, bool ends) {\t\n\tvec2 v[] = $curve;\n\tint l = v.length();\n\tvec2 best_bezier;\n\tif (ends) {\n\t\tbest_bezier = solve_cubic(uv, v[0], v[0], v[1], v[2]);\n\t} else {\n\t\tbest_bezier = vec2(0.0, 10000.0);\n\t}\n\tfloat offset = 0.0;\n\tint i;\n\tfor (i = 0; i < l-3; i++) {\n\t\tvec2 bezier = solve_cubic(uv, v[i], v[i+1], v[i+2], v[i+3]);\n\t\tif (abs(bezier.y) < abs(best_bezier).y) {\n\t\t\tbest_bezier = bezier;\n\t\t\toffset = float(i)+1.0;\n\t\t}\n\t}\n\tfloat width;\n\tif (ends) {\n\t\tvec2 bezier = solve_cubic(uv, v[i], v[i+1], v[i+2], v[i+2]);\n\t\tif (abs(bezier.y) < abs(best_bezier).y) {\n\t\t\tbest_bezier = bezier;\n\t\t\toffset = float(i)+1.0;\n\t\t}\n\t\twidth = $width*$width_map(vec2((best_bezier.x+offset)/float(l-1), 0.0));\n\t} else {\n\t\twidth = $width*$width_map(vec2((best_bezier.x+offset-1.0)/float(l-3), 0.0));\n\t}\n\tvec2 local_uv = vec2(best_bezier.x, best_bezier.y/width+0.5);\n\tvec2 uvtest = step(vec2(0.5), abs(local_uv-vec2(0.5)));\n\treturn mix(vec2(fract($repeat*local_uv.x), local_uv.y), vec2(0.0), max(uvtest.x, uvtest.y));\n}",
"name": "PolyCurve",
"outputs": [
{
"longdesc": "An image showing the specified curve",
"rgba": "$in(bezier_uv_$name($uv, $ends))",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"default": {
"points": [
{
"x": 0.2,
"y": 0.2
},
{
"x": 0.7,
"y": 0.4
},
{
"x": 0.4,
"y": 0.7
}
],
"type": "Polygon"
},
"label": "",
"name": "curve",
"type": "polyline"
},
{
"control": "None",
"default": 0.1,
"label": "Width",
"longdesc": "Width of the curve pattern",
"max": 0.5,
"min": 0,
"name": "width",
"shortdesc": "Width",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Repeat",
"longdesc": "Number of repetitions of the input pattern",
"max": 16,
"min": 1,
"name": "repeat",
"shortdesc": "Repeat",
"step": 1,
"type": "float"
},
{
"default": false,
"label": "Ends",
"longdesc": "If unset, end vertices of the curve are used only for orientation",
"name": "ends",
"shortdesc": "Ends",
"type": "boolean"
}
]
},
"type": "shader"
}

View File

@ -1,121 +0,0 @@
{
"name": "profile",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"gradient": {
"interpolation": 2,
"points": [
{
"a": 1,
"b": 0,
"g": 0,
"pos": 0,
"r": 0
},
{
"a": 1,
"b": 0.55,
"g": 0.55,
"pos": 0.504545,
"r": 0.55
},
{
"a": 1,
"b": 1,
"g": 1,
"pos": 1,
"r": 1
}
],
"type": "Gradient"
},
"style": 1,
"width": 0.01
},
"seed_value": 65353,
"shader_model": {
"code": "",
"global": "float draw_profile_fill(vec2 uv, float y, float dy, float w) {\n\treturn 1.0-clamp(sin(1.57079632679-atan(dy))*(1.0-uv.y-y)/w, 0.0, 1.0);\n}\n\nfloat draw_profile_curve(vec2 uv, float y, float dy, float w) {\n\treturn 1.0-clamp(sin(1.57079632679-atan(dy))*abs(1.0-uv.y-y)/w, 0.0, 1.0);\n}",
"inputs": [
{
"default": "dot($gradient($uv.x).xyz, vec3(1.0/3.0))",
"label": "2:",
"name": "in",
"type": "f"
}
],
"instance": "",
"name": "Profile",
"outputs": [
{
"f": "draw_profile_$style($uv, $in($uv), (dot($gradient($uv.x+0.001).xyz, vec3(1.0/3.0))-dot($gradient($uv.x-0.001).xyz, vec3(1.0/3.0)))/0.002, max(0.0001, $width))",
"longdesc": "An image showing the profile defined by the gradient",
"shortdesc": "Output",
"type": "f"
}
],
"parameters": [
{
"default": 0,
"label": "",
"longdesc": "Style of the output image (fill or curve)",
"name": "style",
"shortdesc": "Style",
"type": "enum",
"values": [
{
"name": "Curve",
"value": "curve"
},
{
"name": "Fill",
"value": "fill"
}
]
},
{
"default": {
"interpolation": 1,
"points": [
{
"a": 1,
"b": 0,
"g": 0,
"pos": 0,
"r": 0
},
{
"a": 1,
"b": 1,
"g": 1,
"pos": 1,
"r": 1
}
],
"type": "Gradient"
},
"label": "",
"longdesc": "Gradient that defines the profile to be shown",
"name": "gradient",
"shortdesc": "Gradient",
"type": "gradient"
},
{
"control": "None",
"default": 0.05,
"label": "",
"longdesc": "Width of the curve",
"max": 1,
"min": 0,
"name": "width",
"shortdesc": "Width",
"step": 0.01,
"type": "float"
}
]
},
"type": "shader"
}

View File

@ -1,51 +0,0 @@
{
"name": "quantize",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"steps": 4
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4(2.0*vec3(length($uv-vec2(0.5))), 1.0)",
"label": "",
"longdesc": "The input image",
"name": "in",
"shortdesc": "Input",
"type": "rgba"
}
],
"instance": "",
"longdesc": "Quantizes the red, green and blue channels of its input",
"name": "Quantize",
"outputs": [
{
"longdesc": "The quantized image",
"rgba": "vec4(floor($in($uv).rgb*$steps)/$steps, $in($uv).a)",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"control": "None",
"default": 4,
"label": "",
"longdesc": "The number of quantization steps",
"max": 32,
"min": 2,
"name": "steps",
"shortdesc": "Steps",
"step": 1,
"type": "float"
}
],
"shortdesc": "Quantize"
},
"type": "shader"
}

View File

@ -1,60 +0,0 @@
{
"name": "refract",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"refract": 1.2
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4($uv, 0.0, 1.0)",
"label": "",
"longdesc": "The input image to be transformed",
"name": "in",
"shortdesc": "Input",
"type": "rgba"
},
{
"default": "max(1.0-2.0*length($uv-vec2(0.5)), 0.0)",
"function": true,
"label": "",
"longdesc": "The magnifying glass shape",
"name": "s",
"shortdesc": "Shape",
"type": "f"
}
],
"instance": "vec2 $(name)_refract(vec2 uv, float refract) {\n\tvec2 eps = vec2(0.001, 0.0);\n\tvec3 n = normalize(vec3($s(uv+eps)-$s(uv-eps), $s(uv+eps.yx)-$s(uv-eps.yx), -10.0*eps.x));\n\tfloat h = $s(uv);\n vec3 i = vec3(0.0, 0.0, -1.0);\n float mu = 1.0/refract;\n \n float dot_n_i = dot(n, i);\n vec3 t = sqrt(max(0.0, 1.0-mu*mu*(1.0-dot_n_i*dot_n_i)))*n+mu*(i-dot_n_i*n);\n \n\treturn uv+h*t.xy/t.z;\n}",
"longdesc": "Magnifying glass effect",
"name": "Refract",
"outputs": [
{
"longdesc": "Shows the transformed image",
"rgba": "$in($(name)_refract($uv, $refract))",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"control": "None",
"default": 1,
"label": "",
"longdesc": "The maximum scaling factor for the magnifying glass",
"max": 2,
"min": 0,
"name": "refract",
"shortdesc": "Scale",
"step": 0.005,
"type": "float"
}
],
"shortdesc": "Magnify"
},
"type": "shader"
}

View File

@ -1,77 +0,0 @@
{
"name": "remap",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"max": 1,
"min": -1,
"step": 0
},
"shader_model": {
"code": "float $(name_uv)_x = $in($uv)*($max-$min);",
"global": "",
"inputs": [
{
"default": "0.0",
"label": "",
"longdesc": "The greyscale input map",
"name": "in",
"shortdesc": "Input",
"type": "f"
}
],
"instance": "",
"longdesc": "Remaps a greyscale image for use as an input map for Advanced Tiler nodes",
"name": "Remap",
"outputs": [
{
"f": "$min+$(name_uv)_x-mod($(name_uv)_x, max($step, 0.00000001))",
"longdesc": "The remapped image map",
"shortdesc": "Output",
"type": "f"
}
],
"parameters": [
{
"control": "None",
"default": 0,
"label": "Min",
"longdesc": "The value generated for black areas of the input",
"max": 10,
"min": -10,
"name": "min",
"shortdesc": "Min",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0,
"label": "Max",
"longdesc": "The value generated for white areas of the input",
"max": 10,
"min": -10,
"name": "max",
"shortdesc": "Max",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0,
"label": "Step",
"longdesc": "The step between generated values",
"max": 1,
"min": 0,
"name": "step",
"shortdesc": "Step",
"step": 0.01,
"type": "float"
}
],
"shortdesc": "Remap"
},
"type": "shader"
}

View File

@ -1,39 +0,0 @@
{
"name": "repeat",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4($uv, 0.0, 1.0)",
"label": "",
"longdesc": "The input image to be transformed",
"name": "i",
"shortdesc": "Input",
"type": "rgba"
}
],
"instance": "",
"longdesc": "Translates, rotates and scales its input",
"name": "Repeat",
"outputs": [
{
"longdesc": "Shows the transformed image",
"rgba": "$i(fract($uv))",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
]
},
"type": "shader"
}

View File

@ -1,50 +0,0 @@
{
"name": "sharpen",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"size": 6
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec3(0.0)",
"function": true,
"label": "",
"longdesc": "The input image",
"name": "in",
"shortdesc": "Input",
"type": "rgb"
}
],
"instance": "vec3 $(name)_fct(vec2 uv) {\n\tvec2 e = vec2(1.0/$size, 0.0);\n\tvec3 rv = 5.0*$in(uv);\n\trv -= $in(uv+e.xy);\n\trv -= $in(uv-e.xy);\n\trv -= $in(uv+e.yx);\n\trv -= $in(uv-e.yx);\n\treturn rv;\n}",
"longdesc": "Sharpens it input image",
"name": "Sharpen",
"outputs": [
{
"longdesc": "Shows the generated sharpened image",
"rgb": "$(name)_fct($uv)",
"shortdesc": "Output",
"type": "rgb"
}
],
"parameters": [
{
"default": 9,
"first": 4,
"label": "Size",
"last": 12,
"longdesc": "The resolution of the input image",
"name": "size",
"shortdesc": "Size",
"type": "size"
}
],
"shortdesc": "Sharpen"
},
"type": "shader"
}

View File

@ -1,70 +0,0 @@
{
"name": "sine_wave",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"amplitude": 0.25,
"frequency": 4,
"phase": 0
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
],
"instance": "",
"longdesc": "Draws a greyscale sine wave pattern",
"name": "Sine Wave",
"outputs": [
{
"f": "1.0-abs(2.0*($uv.y-0.5)-$amplitude*sin(($frequency*$uv.x+$phase)*6.28318530718))",
"longdesc": "Shows a greyscale image of a sine wave",
"shortdesc": "Output",
"type": "f"
}
],
"parameters": [
{
"control": "None",
"default": 0.5,
"label": "Amplitude",
"longdesc": "The amplitude of the sine wave function",
"max": 1,
"min": 0,
"name": "amplitude",
"shortdesc": "Amplitude",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Frequency",
"longdesc": "The frequency of the sine wave function (i.e. the number of oscillations shown in the generated image).",
"max": 16,
"min": 0,
"name": "frequency",
"shortdesc": "Frequency",
"step": 1,
"type": "float"
},
{
"control": "None",
"default": 0,
"label": "Phase",
"longdesc": "The phase of the sine wave function",
"max": 1,
"min": 0,
"name": "phase",
"shortdesc": "Phase",
"step": 0.01,
"type": "float"
}
],
"shortdesc": "Sine wave pattern"
},
"type": "shader"
}

View File

@ -1,61 +0,0 @@
{
"name": "skew",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"amount": -0.175,
"amout": 0,
"direction": 0,
"offset": 0.730769
},
"shader_model": {
"global": "vec2 uvskew_h(vec2 uv, float amount) {\n\treturn vec2(uv.x+amount*(uv.y-0.5), uv.y);\n}\nvec2 uvskew_v(vec2 uv, float amount) {\n\treturn vec2(uv.x, uv.y+amount*(uv.x-0.5));\n}",
"inputs": [
{
"default": "vec4($uv, 0, 1)",
"label": "",
"name": "i",
"type": "rgba"
}
],
"instance": "",
"name": "Skew",
"outputs": [
{
"rgba": "$i(uvskew_$direction($uv, $amount))",
"type": "rgba"
}
],
"parameters": [
{
"default": 0,
"label": "",
"name": "direction",
"type": "enum",
"values": [
{
"name": "Horizontal",
"value": "h"
},
{
"name": "Vertical",
"value": "v"
}
]
},
{
"default": 0,
"label": "",
"max": 3,
"min": -3,
"name": "amount",
"step": 0.005,
"type": "float",
"widget": "spinbox"
}
]
},
"type": "shader"
}

View File

@ -1,230 +0,0 @@
{
"connections": [
{
"from": "gen_inputs",
"from_port": 0,
"to": "buffer",
"to_port": 0
},
{
"from": "buffer",
"from_port": 0,
"to": "edge_detect_3_3_2",
"to_port": 0
},
{
"from": "gen_inputs",
"from_port": 1,
"to": "edge_detect_3_3_2",
"to_port": 1
},
{
"from": "edge_detect_3_3_2",
"from_port": 0,
"to": "buffer_2",
"to_port": 0
},
{
"from": "buffer_2",
"from_port": 0,
"to": "gen_outputs",
"to_port": 0
}
],
"label": "Slope Blur",
"longdesc": "Applys a blur effect on its input, following slopes of an input height map",
"name": "slope_blur",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"name": "buffer",
"node_position": {
"x": -395.25,
"y": -274.75
},
"parameters": {
"lod": 0,
"size": 10
},
"type": "buffer"
},
{
"name": "gen_parameters",
"node_position": {
"x": -462.666626,
"y": -397.666656
},
"parameters": {
"param0": 10,
"param1": 30
},
"type": "remote",
"widgets": [
{
"label": "Grid size:",
"linked_widgets": [
{
"node": "buffer",
"widget": "size"
},
{
"node": "edge_detect_3_3_2",
"widget": "size"
},
{
"node": "buffer_2",
"widget": "size"
}
],
"longdesc": "The resolution of the input image",
"name": "param0",
"shortdesc": "Size",
"type": "linked_control"
},
{
"label": "Sigma",
"linked_widgets": [
{
"node": "edge_detect_3_3_2",
"widget": "sigma"
}
],
"longdesc": "The strength of the blur filter",
"name": "param1",
"shortdesc": "Sigma",
"type": "linked_control"
}
]
},
{
"name": "gen_inputs",
"node_position": {
"x": -872.666626,
"y": -243.392853
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The input image",
"name": "in",
"shortdesc": "Input",
"type": "rgba"
},
{
"group_size": 0,
"longdesc": "A height map whose slopes control the strength and direction of the blur filter",
"name": "heightmap",
"shortdesc": "Height map",
"type": "f"
}
],
"seed_value": 91624,
"type": "ios"
},
{
"name": "gen_outputs",
"node_position": {
"x": -45.452393,
"y": -195.392853
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "Shows the generated blurred image",
"name": "port0",
"shortdesc": "Output",
"type": "rgba"
}
],
"type": "ios"
},
{
"name": "edge_detect_3_3_2",
"node_position": {
"x": -401.725464,
"y": -199.178955
},
"parameters": {
"sigma": 30,
"size": 10
},
"seed_value": -47470,
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4(1.0)",
"function": true,
"label": "",
"name": "in",
"type": "rgba"
},
{
"default": "1.0",
"function": true,
"label": "",
"name": "heightmap",
"type": "f"
}
],
"instance": "vec4 $(name)_fct(vec2 uv) {\n\tfloat dx = 1.0/$size;\n float v = $heightmap(uv);\n\tvec2 slope = vec2($heightmap(uv+vec2(dx, 0.0))-v, $heightmap(uv+vec2(0.0, dx))-v);\n\tfloat slope_strength = length(slope)*$size;\n vec2 norm_slope = (slope_strength == 0.0) ? vec2(0.0, 1.0) : normalize(slope);\n vec2 e = dx*norm_slope;\n\tvec4 rv = vec4(0.0);\n\tfloat sum = 0.0;\n\tfloat sigma = max($sigma*slope_strength, 0.0001);\n\tfor (float i = 0.0; i <= 50.0; i += 1.0) {\n\t\tfloat coef = exp(-0.5*(pow(i/sigma, 2.0)))/(6.28318530718*sigma*sigma);\n\t\trv += $in(uv+i*e)*coef;\n\t\tsum += coef;\n\t}\n\treturn rv/sum;\n}",
"name": "Slope Blur",
"outputs": [
{
"rgba": "$(name)_fct($uv)",
"type": "rgba"
}
],
"parameters": [
{
"default": 9,
"first": 4,
"label": "Size",
"last": 12,
"name": "size",
"type": "size"
},
{
"control": "None",
"default": 0.5,
"label": "Sigma",
"max": 50,
"min": 0,
"name": "sigma",
"step": 0.1,
"type": "float"
}
]
},
"type": "shader"
},
{
"name": "buffer_2",
"node_position": {
"x": -392.952209,
"y": -115.576294
},
"parameters": {
"lod": 0,
"size": 10
},
"type": "buffer"
}
],
"parameters": {
"param0": 10,
"param1": 30
},
"shortdesc": "Slope blur",
"type": "graph"
}

View File

@ -1,880 +0,0 @@
{
"connections": [
{
"from": "blend",
"from_port": 0,
"to": "blend_2",
"to_port": 1
},
{
"from": "blend_2",
"from_port": 0,
"to": "blend_3",
"to_port": 1
},
{
"from": "blend_3",
"from_port": 0,
"to": "blend_4",
"to_port": 1
},
{
"from": "blend_4",
"from_port": 0,
"to": "invert",
"to_port": 0
},
{
"from": "invert",
"from_port": 0,
"to": "gen_outputs",
"to_port": 0
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "normal_map",
"to_port": 0
},
{
"from": "598_3",
"from_port": 0,
"to": "fast_blur",
"to_port": 0
},
{
"from": "fast_blur",
"from_port": 0,
"to": "blend_4",
"to_port": 0
},
{
"from": "598_2",
"from_port": 0,
"to": "fast_blur_2",
"to_port": 0
},
{
"from": "fast_blur_2",
"from_port": 0,
"to": "blend_3",
"to_port": 0
},
{
"from": "598_4",
"from_port": 0,
"to": "fast_blur_3",
"to_port": 0
},
{
"from": "fast_blur_3",
"from_port": 0,
"to": "blend_2",
"to_port": 0
},
{
"from": "598_5",
"from_port": 0,
"to": "fast_blur_4",
"to_port": 0
},
{
"from": "fast_blur_4",
"from_port": 0,
"to": "blend",
"to_port": 0
},
{
"from": "598_6",
"from_port": 0,
"to": "fast_blur_5",
"to_port": 0
},
{
"from": "fast_blur_5",
"from_port": 0,
"to": "blend",
"to_port": 1
},
{
"from": "normal_map",
"from_port": 0,
"to": "buffer_2",
"to_port": 0
},
{
"from": "buffer_2",
"from_port": 0,
"to": "598_3",
"to_port": 0
},
{
"from": "buffer_2",
"from_port": 0,
"to": "598_2",
"to_port": 0
},
{
"from": "buffer_2",
"from_port": 0,
"to": "598_4",
"to_port": 0
},
{
"from": "buffer_2",
"from_port": 0,
"to": "598_5",
"to_port": 0
},
{
"from": "buffer_2",
"from_port": 0,
"to": "598_6",
"to_port": 0
}
],
"label": "Smooth Curvature",
"longdesc": "Creates a smooth curvature map from a height map",
"name": "smooth_curvature",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"name": "normal_map",
"node_position": {
"x": -684.409058,
"y": 680
},
"parameters": {
"param0": 11,
"param1": 1,
"param2": 0,
"param4": 1
},
"type": "normal_map"
},
{
"name": "blend",
"node_position": {
"x": 510.361206,
"y": 903.779297
},
"parameters": {
"amount": 1,
"blend_type": 4
},
"type": "blend"
},
{
"name": "blend_2",
"node_position": {
"x": 510.179382,
"y": 803.915527
},
"parameters": {
"amount": 1,
"blend_type": 4
},
"type": "blend"
},
{
"name": "blend_3",
"node_position": {
"x": 509.270233,
"y": 702.279175
},
"parameters": {
"amount": 1,
"blend_type": 4
},
"type": "blend"
},
{
"name": "blend_4",
"node_position": {
"x": 509.542999,
"y": 600.279175
},
"parameters": {
"amount": 1,
"blend_type": 4
},
"type": "blend"
},
{
"name": "invert",
"node_position": {
"x": 754.354553,
"y": 603.172791
},
"parameters": {
},
"type": "invert"
},
{
"name": "gen_inputs",
"node_position": {
"x": -1097.162842,
"y": 678.835876
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The input height map",
"name": "port0",
"shortdesc": "Height map",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_outputs",
"node_position": {
"x": 908.046326,
"y": 596.806824
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The generated curvature map",
"name": "port0",
"shortdesc": "Output",
"type": "rgba"
}
],
"type": "ios"
},
{
"name": "gen_parameters",
"node_position": {
"x": -121.992188,
"y": 350.266235
},
"parameters": {
"param0": 11,
"param2": 1
},
"type": "remote",
"widgets": [
{
"label": "Size",
"linked_widgets": [
{
"node": "normal_map",
"widget": "param0"
},
{
"node": "598_3",
"widget": "size"
},
{
"node": "fast_blur",
"widget": "param0"
},
{
"node": "598_2",
"widget": "size"
},
{
"node": "fast_blur_2",
"widget": "param0"
},
{
"node": "598_4",
"widget": "size"
},
{
"node": "fast_blur_3",
"widget": "param0"
},
{
"node": "fast_blur_4",
"widget": "param0"
},
{
"node": "598_5",
"widget": "size"
},
{
"node": "fast_blur_5",
"widget": "param0"
},
{
"node": "598_6",
"widget": "size"
},
{
"node": "buffer_2",
"widget": "size"
}
],
"longdesc": "The buffer size for the filter",
"name": "param0",
"shortdesc": "Size",
"type": "linked_control"
},
{
"label": "Intensity",
"linked_widgets": [
{
"node": "normal_map",
"widget": "param1"
}
],
"longdesc": "The contrast of the generated highlights",
"name": "param2",
"shortdesc": "Intensity",
"type": "linked_control"
}
]
},
{
"name": "598_3",
"node_position": {
"x": -94.135475,
"y": 510.526459
},
"parameters": {
"amount": 1,
"size": 11,
"width": 1
},
"shader_model": {
"code": "vec2 $(name_uv)_emboss = $(name)_fct($uv);",
"global": "",
"inputs": [
{
"default": "vec3(0.0)",
"function": true,
"label": "",
"name": "in",
"type": "rgb"
}
],
"instance": "vec2 $(name)_fct(vec2 uv) {\n\tfloat pixels = max(1.0, $width);\n\tfloat e = 1.0/$size;\n\tvec2 rv = vec2(0.0);\n\tfor (float dx = -pixels; dx <= pixels; dx += 1.0) {\n\t\tfor (float dy = -pixels; dy <= pixels; dy += 1.0) {\n\t\t\tif (abs(dx) > 0.5 || abs(dy) > 0.5) {\n\t\t\t\trv += $in(uv+e*vec2(dx, dy)).xy*cos(vec2(atan(dy, dx))-vec2(0.0, 0.5)*3.14159265359)/length(vec2(dx, dy));\n\t\t\t}\n\t\t}\n\t}\n\treturn $amount*rv/pixels+0.5;\n}",
"name": "Curvature",
"outputs": [
{
"f": "0.5*($(name_uv)_emboss.x+$(name_uv)_emboss.y)",
"type": "f"
}
],
"parameters": [
{
"default": 9,
"first": 6,
"label": "Size",
"last": 12,
"name": "size",
"type": "size"
},
{
"control": "None",
"default": 1,
"label": "Amount",
"max": 10,
"min": 0,
"name": "amount",
"step": 0.1,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Width",
"max": 5,
"min": 1,
"name": "width",
"step": 1,
"type": "float"
}
]
},
"type": "shader"
},
{
"name": "598_2",
"node_position": {
"x": -100.207932,
"y": 638.757874
},
"parameters": {
"amount": 1,
"size": 11,
"width": 2
},
"shader_model": {
"code": "vec2 $(name_uv)_emboss = $(name)_fct($uv);",
"global": "",
"inputs": [
{
"default": "vec3(0.0)",
"function": true,
"label": "",
"name": "in",
"type": "rgb"
}
],
"instance": "vec2 $(name)_fct(vec2 uv) {\n\tfloat pixels = max(1.0, $width);\n\tfloat e = 1.0/$size;\n\tvec2 rv = vec2(0.0);\n\tfor (float dx = -pixels; dx <= pixels; dx += 1.0) {\n\t\tfor (float dy = -pixels; dy <= pixels; dy += 1.0) {\n\t\t\tif (abs(dx) > 0.5 || abs(dy) > 0.5) {\n\t\t\t\trv += $in(uv+e*vec2(dx, dy)).xy*cos(vec2(atan(dy, dx))-vec2(0.0, 0.5)*3.14159265359)/length(vec2(dx, dy));\n\t\t\t}\n\t\t}\n\t}\n\treturn $amount*rv/pixels+0.5;\n}",
"name": "Curvature",
"outputs": [
{
"f": "0.5*($(name_uv)_emboss.x+$(name_uv)_emboss.y)",
"type": "f"
}
],
"parameters": [
{
"default": 9,
"first": 6,
"label": "Size",
"last": 12,
"name": "size",
"type": "size"
},
{
"control": "None",
"default": 1,
"label": "Amount",
"max": 10,
"min": 0,
"name": "amount",
"step": 0.1,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Width",
"max": 5,
"min": 1,
"name": "width",
"step": 1,
"type": "float"
}
]
},
"type": "shader"
},
{
"name": "598_4",
"node_position": {
"x": -97.532082,
"y": 755.803345
},
"parameters": {
"amount": 1,
"size": 11,
"width": 4
},
"shader_model": {
"code": "vec2 $(name_uv)_emboss = $(name)_fct($uv);",
"global": "",
"inputs": [
{
"default": "vec3(0.0)",
"function": true,
"label": "",
"name": "in",
"type": "rgb"
}
],
"instance": "vec2 $(name)_fct(vec2 uv) {\n\tfloat pixels = max(1.0, $width);\n\tfloat e = 1.0/$size;\n\tvec2 rv = vec2(0.0);\n\tfor (float dx = -pixels; dx <= pixels; dx += 1.0) {\n\t\tfor (float dy = -pixels; dy <= pixels; dy += 1.0) {\n\t\t\tif (abs(dx) > 0.5 || abs(dy) > 0.5) {\n\t\t\t\trv += $in(uv+e*vec2(dx, dy)).xy*cos(vec2(atan(dy, dx))-vec2(0.0, 0.5)*3.14159265359)/length(vec2(dx, dy));\n\t\t\t}\n\t\t}\n\t}\n\treturn $amount*rv/pixels+0.5;\n}",
"name": "Curvature",
"outputs": [
{
"f": "0.5*($(name_uv)_emboss.x+$(name_uv)_emboss.y)",
"type": "f"
}
],
"parameters": [
{
"default": 9,
"first": 6,
"label": "Size",
"last": 12,
"name": "size",
"type": "size"
},
{
"control": "None",
"default": 1,
"label": "Amount",
"max": 10,
"min": 0,
"name": "amount",
"step": 0.1,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Width",
"max": 5,
"min": 1,
"name": "width",
"step": 1,
"type": "float"
}
]
},
"type": "shader"
},
{
"name": "598_5",
"node_position": {
"x": -95.713867,
"y": 877.621521
},
"parameters": {
"amount": 1,
"size": 11,
"width": 8
},
"shader_model": {
"code": "vec2 $(name_uv)_emboss = $(name)_fct($uv);",
"global": "",
"inputs": [
{
"default": "vec3(0.0)",
"function": true,
"label": "",
"name": "in",
"type": "rgb"
}
],
"instance": "vec2 $(name)_fct(vec2 uv) {\n\tfloat pixels = max(1.0, $width);\n\tfloat e = 1.0/$size;\n\tvec2 rv = vec2(0.0);\n\tfor (float dx = -pixels; dx <= pixels; dx += 1.0) {\n\t\tfor (float dy = -pixels; dy <= pixels; dy += 1.0) {\n\t\t\tif (abs(dx) > 0.5 || abs(dy) > 0.5) {\n\t\t\t\trv += $in(uv+e*vec2(dx, dy)).xy*cos(vec2(atan(dy, dx))-vec2(0.0, 0.5)*3.14159265359)/length(vec2(dx, dy));\n\t\t\t}\n\t\t}\n\t}\n\treturn $amount*rv/pixels+0.5;\n}",
"name": "Curvature",
"outputs": [
{
"f": "0.5*($(name_uv)_emboss.x+$(name_uv)_emboss.y)",
"type": "f"
}
],
"parameters": [
{
"default": 9,
"first": 6,
"label": "Size",
"last": 12,
"name": "size",
"type": "size"
},
{
"control": "None",
"default": 1,
"label": "Amount",
"max": 10,
"min": 0,
"name": "amount",
"step": 0.1,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Width",
"max": 5,
"min": 1,
"name": "width",
"step": 1,
"type": "float"
}
]
},
"type": "shader"
},
{
"name": "598_6",
"node_position": {
"x": -92.077492,
"y": 992.848633
},
"parameters": {
"amount": 1,
"size": 11,
"width": 16
},
"shader_model": {
"code": "vec2 $(name_uv)_emboss = $(name)_fct($uv);",
"global": "",
"inputs": [
{
"default": "vec3(0.0)",
"function": true,
"label": "",
"name": "in",
"type": "rgb"
}
],
"instance": "vec2 $(name)_fct(vec2 uv) {\n\tfloat pixels = max(1.0, $width);\n\tfloat e = 1.0/$size;\n\tvec2 rv = vec2(0.0);\n\tfor (float dx = -pixels; dx <= pixels; dx += 1.0) {\n\t\tfor (float dy = -pixels; dy <= pixels; dy += 1.0) {\n\t\t\tif (abs(dx) > 0.5 || abs(dy) > 0.5) {\n\t\t\t\trv += $in(uv+e*vec2(dx, dy)).xy*cos(vec2(atan(dy, dx))-vec2(0.0, 0.5)*3.14159265359)/length(vec2(dx, dy));\n\t\t\t}\n\t\t}\n\t}\n\treturn $amount*rv/pixels+0.5;\n}",
"name": "Curvature",
"outputs": [
{
"f": "0.5*($(name_uv)_emboss.x+$(name_uv)_emboss.y)",
"type": "f"
}
],
"parameters": [
{
"default": 9,
"first": 6,
"label": "Size",
"last": 12,
"name": "size",
"type": "size"
},
{
"control": "None",
"default": 1,
"label": "Amount",
"max": 10,
"min": 0,
"name": "amount",
"step": 0.1,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Width",
"max": 5,
"min": 1,
"name": "width",
"step": 1,
"type": "float"
}
]
},
"type": "shader"
},
{
"connections": [
{
"from": "buffer_2",
"from_port": 0,
"to": "fast_blur_shader",
"to_port": 0
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "buffer_2",
"to_port": 0
},
{
"from": "fast_blur_shader",
"from_port": 0,
"to": "gen_outputs",
"to_port": 0
}
],
"label": "Fast Blur",
"longdesc": "",
"name": "fast_blur",
"node_position": {
"x": 167.483093,
"y": 509.757843
},
"nodes": [
{
"name": "fast_blur_shader",
"node_position": {
"x": -168,
"y": 120
},
"parameters": {
"quality": 1,
"sigma": 2
},
"type": "fast_blur_shader"
},
{
"name": "buffer_2",
"node_position": {
"x": -187,
"y": 61.5
},
"parameters": {
"size": 11
},
"type": "buffer",
"version": 1
},
{
"name": "gen_inputs",
"node_position": {
"x": -602,
"y": 91.75
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"name": "port0",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_outputs",
"node_position": {
"x": 88,
"y": 61.75
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"name": "port0",
"type": "rgba"
}
],
"type": "ios"
},
{
"name": "gen_parameters",
"node_position": {
"x": -254.5,
"y": -122.5
},
"parameters": {
"param0": 11,
"param1": 2,
"param2": 1
},
"type": "remote",
"widgets": [
{
"label": "Resolution",
"linked_widgets": [
{
"node": "buffer_2",
"widget": "size"
}
],
"name": "param0",
"type": "linked_control"
},
{
"label": "Sigma",
"linked_widgets": [
{
"node": "fast_blur_shader",
"widget": "sigma"
}
],
"name": "param1",
"type": "linked_control"
},
{
"label": "Quality",
"linked_widgets": [
{
"node": "fast_blur_shader",
"widget": "quality"
}
],
"name": "param2",
"type": "linked_control"
}
]
}
],
"parameters": {
"param0": 11,
"param1": 2,
"param2": 1
},
"shortdesc": "",
"type": "graph"
},
{
"name": "fast_blur_2",
"node_position": {
"x": 167.156082,
"y": 638.560974
},
"parameters": {
"param0": 11,
"param1": 5,
"param2": 1
},
"type": "fast_blur"
},
{
"name": "fast_blur_3",
"node_position": {
"x": 171.701691,
"y": 756.742798
},
"parameters": {
"param0": 11,
"param1": 8,
"param2": 1
},
"type": "fast_blur"
},
{
"name": "fast_blur_4",
"node_position": {
"x": 167.377045,
"y": 877.651917
},
"parameters": {
"param0": 11,
"param1": 16,
"param2": 1
},
"type": "fast_blur"
},
{
"name": "fast_blur_5",
"node_position": {
"x": 170.104279,
"y": 992.197327
},
"parameters": {
"param0": 11,
"param1": 34,
"param2": 1
},
"type": "fast_blur"
},
{
"name": "buffer_2",
"node_position": {
"x": -426.44928,
"y": 678.75
},
"parameters": {
"filter": false,
"mipmap": false,
"size": 11
},
"type": "buffer",
"version": 2
}
],
"parameters": {
"param0": 11,
"param2": 1
},
"shortdesc": "Smooth Curvature",
"type": "graph"
}

View File

@ -1,475 +0,0 @@
{
"connections": [
{
"from": "gen_inputs",
"from_port": 0,
"to": "buffer",
"to_port": 0
},
{
"from": "buffer",
"from_port": 0,
"to": "switch",
"to_port": 1
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "switch",
"to_port": 0
},
{
"from": "598",
"from_port": 0,
"to": "buffer_2",
"to_port": 0
},
{
"from": "buffer_2",
"from_port": 0,
"to": "switch_2",
"to_port": 1
},
{
"from": "598",
"from_port": 0,
"to": "switch_2",
"to_port": 0
},
{
"from": "switch_2",
"from_port": 0,
"to": "gen_outputs",
"to_port": 0
},
{
"from": "switch",
"from_port": 0,
"to": "598",
"to_port": 0
}
],
"label": "Smooth Curvature 2",
"longdesc": "",
"name": "smooth_curvature2",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"name": "buffer",
"node_position": {
"x": 300.603302,
"y": -549.522034
},
"parameters": {
"lod": 0,
"size": 10
},
"type": "buffer"
},
{
"name": "598",
"node_position": {
"x": 286.999847,
"y": -359.903259
},
"parameters": {
"quality": 4,
"radius": 1,
"strength": 1
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "0.5",
"function": true,
"label": "",
"name": "in",
"type": "f"
}
],
"instance": "float $(name)_curve( vec2 p, vec2 o ){\n\tfloat a = $in(p+o);\n\tfloat b = $in(p-o);\n\tfloat c = $in(p+o*vec2(1.0,-1.0));\n\tfloat d = $in(p-o*vec2(1.0,-1.0));\n\treturn -a - b - c - d;\n}\n\nfloat $(name)_curvature_map(vec2 p, float r, float q){\n\tfloat s = r/q;\n\tfloat H = $in(p)*4.0;\n\tfloat v = 0.0;\n\tvec2 o;\n\tfor( o.x = 0.0; o.x < q; o.x++ ){\n\t\tfor( o.y = 0.0; o.y < q; o.y++ ){\n\t\t\tfloat c = $(name)_curve(p, o*s);\n\t\t\tv += (H + c) * ((r-length(o*s)) / r);\n\t\t}\n\t}\n\treturn v/(q*q);\n}\n\nfloat $(name)_curvature(vec2 uv, float quality, float strength, float radius) {\n\tfloat c = $(name)_curvature_map(uv, 0.050 * radius, quality)*strength / radius;\n\treturn 0.5 + c;\n}",
"name": "Smooth Curvature",
"outputs": [
{
"f": "$(name)_curvature($uv, $quality, $strength, $radius)",
"type": "f"
}
],
"parameters": [
{
"control": "None",
"default": 4,
"label": "Quality",
"longdesc": "How many times the input is sampled to generate the curvature map",
"max": 16,
"min": 2,
"name": "quality",
"shortdesc": "Quality",
"step": 1,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Strength",
"longdesc": "The intensity of the curvature map",
"max": 2,
"min": 0,
"name": "strength",
"shortdesc": "Strength",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Radius",
"longdesc": "The radius of the smoothing of the curvature effect",
"max": 2,
"min": 0,
"name": "radius",
"shortdesc": "Radius",
"step": 0.01,
"type": "float"
}
],
"shortdesc": "Smooth Curvature"
},
"type": "shader"
},
{
"name": "gen_parameters",
"node_position": {
"x": 242.146149,
"y": -788.088806
},
"parameters": {
"param0": 10,
"param1": 4,
"param2": 1,
"param3": 1,
"param4": 1
},
"type": "remote",
"widgets": [
{
"label": "Size",
"linked_widgets": [
{
"node": "buffer",
"widget": "size"
},
{
"node": "buffer_2",
"widget": "size"
}
],
"longdesc": "The resolution of the curvature map if buffer is used",
"name": "param0",
"shortdesc": "Size",
"type": "linked_control"
},
{
"label": "Quality",
"linked_widgets": [
{
"node": "598",
"widget": "quality"
}
],
"longdesc": "How many times the input is sampled to generate the curvature map",
"name": "param1",
"shortdesc": "Quality",
"type": "linked_control"
},
{
"label": "Strength",
"linked_widgets": [
{
"node": "598",
"widget": "strength"
}
],
"longdesc": "The intensity of the curvature map",
"name": "param2",
"shortdesc": "Strength",
"type": "linked_control"
},
{
"label": "Radius",
"linked_widgets": [
{
"node": "598",
"widget": "radius"
}
],
"longdesc": "The radius of the smoothing of the curvature effect",
"name": "param3",
"shortdesc": "Radius",
"type": "linked_control"
},
{
"configurations": {
"False": [
{
"node": "switch",
"value": 0,
"widget": "source"
},
{
"node": "switch_2",
"value": 0,
"widget": "source"
}
],
"True": [
{
"node": "switch",
"value": 1,
"widget": "source"
},
{
"node": "switch_2",
"value": 1,
"widget": "source"
}
]
},
"label": "Buffer",
"linked_widgets": [
{
"node": "switch",
"widget": "source"
},
{
"node": "switch_2",
"widget": "source"
}
],
"longdesc": "When set, a buffer is used to sample the input before the normal map filter",
"name": "param4",
"shortdesc": "Buffer",
"type": "config_control"
}
]
},
{
"name": "gen_inputs",
"node_position": {
"x": -135.453888,
"y": -518.927429
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "The input height map",
"name": "Heightmap",
"shortdesc": "Input",
"type": "f"
}
],
"type": "ios"
},
{
"name": "gen_outputs",
"node_position": {
"x": 586.203247,
"y": -534.919678
},
"parameters": {
},
"ports": [
{
"group_size": 0,
"longdesc": "Shows the generated curvature map",
"name": "Curvature",
"shortdesc": "Output",
"type": "f"
}
],
"type": "ios"
},
{
"name": "switch",
"node_position": {
"x": 310.739746,
"y": -451.658417
},
"parameters": {
"choices": 2,
"outputs": 1,
"source": 1
},
"type": "switch"
},
{
"name": "buffer_2",
"node_position": {
"x": 293.839874,
"y": -225.201691
},
"parameters": {
"lod": 0,
"size": 10
},
"type": "buffer"
},
{
"name": "switch_2",
"node_position": {
"x": 312.239838,
"y": -129.465912
},
"parameters": {
"choices": 2,
"outputs": 1,
"source": 1
},
"type": "switch"
},
{
"name": "blend",
"node_position": {
"x": 802.064697,
"y": -277.727295
},
"parameters": {
"amount": 0.5,
"blend_type": 0
},
"shader_model": {
"code": "vec4 $(name_uv)_s1 = $s1($uv);\nvec4 $(name_uv)_s2 = $s2($uv);\nfloat $(name_uv)_a = $amount*$a($uv);\n",
"global": "vec3 blend_normal(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*c1 + (1.0-opacity)*c2;\n}\n\nvec3 blend_dissolve(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\tif (rand(uv) < opacity) {\n\t\treturn c1;\n\t} else {\n\t\treturn c2;\n\t}\n}\n\nvec3 blend_multiply(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*c1*c2 + (1.0-opacity)*c2;\n}\n\nvec3 blend_screen(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*(1.0-(1.0-c1)*(1.0-c2)) + (1.0-opacity)*c2;\n}\n\nfloat blend_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 blend_overlay(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blend_overlay_f(c1.x, c2.x), blend_overlay_f(c1.y, c2.y), blend_overlay_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nvec3 blend_hard_light(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*0.5*(c1*c2+blend_overlay(uv, c1, c2, 1.0)) + (1.0-opacity)*c2;\n}\n\nfloat blend_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 blend_soft_light(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blend_soft_light_f(c1.x, c2.x), blend_soft_light_f(c1.y, c2.y), blend_soft_light_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nfloat blend_burn_f(float c1, float c2) {\n\treturn (c1==0.0)?c1:max((1.0-((1.0-c2)/c1)),0.0);\n}\n\nvec3 blend_burn(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blend_burn_f(c1.x, c2.x), blend_burn_f(c1.y, c2.y), blend_burn_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nfloat blend_dodge_f(float c1, float c2) {\n\treturn (c1==1.0)?c1:min(c2/(1.0-c1),1.0);\n}\n\nvec3 blend_dodge(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*vec3(blend_dodge_f(c1.x, c2.x), blend_dodge_f(c1.y, c2.y), blend_dodge_f(c1.z, c2.z)) + (1.0-opacity)*c2;\n}\n\nvec3 blend_lighten(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*max(c1, c2) + (1.0-opacity)*c2;\n}\n\nvec3 blend_darken(vec2 uv, vec3 c1, vec3 c2, float opacity) {\n\treturn opacity*min(c1, c2) + (1.0-opacity)*c2;\n}\n\nvec3 blend_difference(vec2 uv, 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": "vec4(round($uv.x) , 1.0, 1.0, 1.0)",
"label": "Source1",
"longdesc": "The foreground input",
"name": "s1",
"shortdesc": "Foreground",
"type": "rgba"
},
{
"default": "vec4(1.0, $uv.y, 1.0, 1.0)",
"label": "Source2",
"longdesc": "The background input",
"name": "s2",
"shortdesc": "Background",
"type": "rgba"
},
{
"default": "1.0",
"label": "Opacity",
"longdesc": "The optional opacity mask",
"name": "a",
"shortdesc": "Mask",
"type": "f"
}
],
"instance": "",
"longdesc": "Blends its input, using an optional mask",
"name": "Blend",
"outputs": [
{
"longdesc": "Shows the result of the blend operation",
"rgba": "vec4(blend_$blend_type($uv, $(name_uv)_s1.rgb, $(name_uv)_s2.rgb, $(name_uv)_a*$(name_uv)_s1.a), min(1.0, $(name_uv)_s2.a+$(name_uv)_a*$(name_uv)_s1.a))",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"default": 0,
"label": "",
"longdesc": "The algorithm used to blend the inputs",
"name": "blend_type",
"shortdesc": "Blend mode",
"type": "enum",
"values": [
{
"name": "Normal",
"value": "normal"
},
{
"name": "Dissolve",
"value": "dissolve"
},
{
"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": "3:",
"longdesc": "The opacity of the blend operation",
"max": 1,
"min": 0,
"name": "amount",
"shortdesc": "Opacity",
"step": 0.01,
"type": "float"
}
],
"shortdesc": "Blend"
},
"type": "shader"
}
],
"parameters": {
"param0": 10,
"param1": 4,
"param2": 1,
"param3": 1,
"param4": 1
},
"shortdesc": "Smooth Curvature",
"type": "graph"
}

View File

@ -1,76 +0,0 @@
{
"name": "supersample",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"count": 2,
"size": 9,
"width": 1
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4(1.0, 1.0, 1.0, 1.0)",
"function": true,
"label": "",
"longdesc": "The input image",
"name": "in",
"shortdesc": "Input",
"type": "rgba"
}
],
"instance": "vec4 supersample_$(name)(vec2 uv, float size, int count, float width) {\n\tvec4 rv = vec4(0.0);\n\tvec2 step_size = vec2(width)/size/float(count);\n\tuv -= vec2(0.5)/size;\n\tfor (int x = 0; x < count; ++x) {\n\t\tfor (int y = 0; y < count; ++y) {\n\t\t\trv += $in(uv+(vec2(float(x), float(y))+vec2(0.5))*step_size);\n\t\t}\n\t}\n\treturn rv/float(count*count);\n}",
"longdesc": "A filter that samples sub-pixel details to make them visible",
"name": "Supersample",
"outputs": [
{
"longdesc": "Shows the supersampled image. Due to the performance cost of this node, it is recommended to connect a buffer directly to this output.",
"rgba": "supersample_$(name)($uv, $size, int($count), $width)",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"default": 10,
"first": 4,
"label": "Size",
"last": 12,
"longdesc": "The resolution of the output",
"name": "size",
"shortdesc": "Size",
"type": "size"
},
{
"control": "None",
"default": 2,
"label": "Count",
"longdesc": "The number of samples on each axis. High values will badly impact performances.",
"max": 5,
"min": 2,
"name": "count",
"shortdesc": "Count",
"step": 1,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Width",
"longdesc": "The width of the sampled area. Setting this value higher than 1 will sample neighbouring pixels and antialias the result.",
"max": 2,
"min": 1,
"name": "width",
"shortdesc": "Width",
"step": 0.01,
"type": "float"
}
],
"shortdesc": "Supersample"
},
"type": "shader"
}

View File

@ -1,242 +0,0 @@
{
"name": "swap_channels",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"out_a": 8,
"out_b": 6,
"out_g": 4,
"out_r": 2
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4(1.0)",
"label": "",
"longdesc": "The input RGBA image",
"name": "in",
"shortdesc": "Input",
"type": "rgba"
}
],
"instance": "",
"longdesc": "Swaps the channels of its RGBA input",
"name": "Swap channels",
"outputs": [
{
"longdesc": "The output RGBA image",
"rgba": "vec4($out_r,$out_g,$out_b,$out_a)",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"default": 2,
"label": "R",
"longdesc": "The input channel to be assigned to the Red channel",
"name": "out_r",
"shortdesc": "Red",
"type": "enum",
"values": [
{
"name": "0",
"value": "0.0"
},
{
"name": "1",
"value": "1.0"
},
{
"name": "R",
"value": "$in($uv).r"
},
{
"name": "-R",
"value": "1.0-$in($uv).r"
},
{
"name": "G",
"value": "$in($uv).g"
},
{
"name": "-G",
"value": "1.0-$in($uv).g"
},
{
"name": "B",
"value": "$in($uv).b"
},
{
"name": "-B",
"value": "1.0-$in($uv).b"
},
{
"name": "A",
"value": "$in($uv).a"
},
{
"name": "-A",
"value": "1.0-$in($uv).a"
}
]
},
{
"default": 4,
"label": "G",
"longdesc": "The input channel to be assigned to the Green channel",
"name": "out_g",
"shortdesc": "Green",
"type": "enum",
"values": [
{
"name": "0",
"value": "0.0"
},
{
"name": "1",
"value": "1.0"
},
{
"name": "R",
"value": "$in($uv).r"
},
{
"name": "-R",
"value": "1.0-$in($uv).r"
},
{
"name": "G",
"value": "$in($uv).g"
},
{
"name": "-G",
"value": "1.0-$in($uv).g"
},
{
"name": "B",
"value": "$in($uv).b"
},
{
"name": "-B",
"value": "1.0-$in($uv).b"
},
{
"name": "A",
"value": "$in($uv).a"
},
{
"name": "-A",
"value": "1.0-$in($uv).a"
}
]
},
{
"default": 6,
"label": "B",
"longdesc": "The input channel to be assigned to the Blue channel",
"name": "out_b",
"shortdesc": "Blue",
"type": "enum",
"values": [
{
"name": "0",
"value": "0.0"
},
{
"name": "1",
"value": "1.0"
},
{
"name": "R",
"value": "$in($uv).r"
},
{
"name": "-R",
"value": "1.0-$in($uv).r"
},
{
"name": "G",
"value": "$in($uv).g"
},
{
"name": "-G",
"value": "1.0-$in($uv).g"
},
{
"name": "B",
"value": "$in($uv).b"
},
{
"name": "-B",
"value": "1.0-$in($uv).b"
},
{
"name": "A",
"value": "$in($uv).a"
},
{
"name": "-A",
"value": "1.0-$in($uv).a"
}
]
},
{
"default": 8,
"label": "A",
"longdesc": "The input channel to be assigned to the Alpha channel",
"name": "out_a",
"shortdesc": "Alpha",
"type": "enum",
"values": [
{
"name": "0",
"value": "0.0"
},
{
"name": "1",
"value": "1.0"
},
{
"name": "R",
"value": "$in($uv).r"
},
{
"name": "-R",
"value": "1.0-$in($uv).r"
},
{
"name": "G",
"value": "$in($uv).g"
},
{
"name": "-G",
"value": "1.0-$in($uv).g"
},
{
"name": "B",
"value": "$in($uv).b"
},
{
"name": "-B",
"value": "1.0-$in($uv).b"
},
{
"name": "A",
"value": "$in($uv).a"
},
{
"name": "-A",
"value": "1.0-$in($uv).a"
}
]
}
],
"shortdesc": "Swap channels"
},
"type": "shader"
}

View File

@ -1,79 +0,0 @@
{
"name": "tonality",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"curve": {
"points": [
{
"ls": 0,
"rs": 1,
"x": 0,
"y": 0
},
{
"ls": 1,
"rs": 0,
"x": 1,
"y": 1
}
],
"type": "Curve"
}
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "$uv.x",
"label": "",
"longdesc": "The input greyscale image",
"name": "input",
"shortdesc": "Input",
"type": "f"
}
],
"instance": "",
"longdesc": "Remaps a greyscale image tonality using a curve",
"name": "Tonality",
"outputs": [
{
"f": "$curve($input($uv))",
"longdesc": "The remapped greyscale image",
"shortdesc": "Output",
"type": "f"
}
],
"parameters": [
{
"default": {
"points": [
{
"ls": 0,
"rs": 1,
"x": 0,
"y": 0
},
{
"ls": 1,
"rs": 0,
"x": 1,
"y": 1
}
],
"type": "Curve"
},
"label": "",
"longdesc": "The tonality curve to which the input is remapped",
"name": "curve",
"shortdesc": "Curve",
"type": "curve"
}
],
"shortdesc": "Tonality"
},
"type": "shader"
}

View File

@ -1,122 +0,0 @@
{
"name": "levels",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"in_max": {
"a": 1,
"b": 1,
"g": 1,
"r": 1,
"type": "Color"
},
"in_mid": {
"a": 0.5,
"b": 0.5,
"g": 0.5,
"r": 0.5,
"type": "Color"
},
"in_min": {
"a": 0,
"b": 0,
"g": 0,
"r": 0,
"type": "Color"
},
"out_max": {
"a": 1,
"b": 1,
"g": 1,
"r": 1,
"type": "Color"
},
"out_min": {
"a": 0,
"b": 0,
"g": 0,
"r": 0,
"type": "Color"
}
},
"shader_model": {
"code": "",
"global": "vec4 adjust_levels(vec4 input, vec4 in_min, vec4 in_mid, vec4 in_max, vec4 out_min, vec4 out_max) {\n\tinput = clamp((input-in_min)/(in_max-in_min), 0.0, 1.0);\n\tin_mid = (in_mid-in_min)/(in_max-in_min);\n\tvec4 dark = step(in_mid, input);\n\tinput = 0.5*mix(input/(in_mid), 1.0+(input-in_mid)/(1.0-in_mid), dark);\n\treturn out_min+input*(out_max-out_min);\n}\n",
"inputs": [
{
"default": "vec4(1.0)",
"label": "",
"name": "input",
"type": "rgba"
}
],
"instance": "",
"name": "Levels",
"outputs": [
{
"rgba": "adjust_levels($input($uv), $in_min, $in_mid, $in_max, $out_min, $out_max)",
"type": "rgba"
}
],
"parameters": [
{
"default": {
"a": 0,
"b": 0,
"g": 0,
"r": 0
},
"label": "",
"name": "in_min",
"type": "color"
},
{
"default": {
"a": 0.498039,
"b": 0.498039,
"g": 0.498039,
"r": 0.498039
},
"label": "",
"name": "in_mid",
"type": "color"
},
{
"default": {
"a": 1,
"b": 1,
"g": 1,
"r": 1
},
"label": "",
"name": "in_max",
"type": "color"
},
{
"default": {
"a": 1,
"b": 0,
"g": 0,
"r": 0
},
"label": "",
"name": "out_min",
"type": "color"
},
{
"default": {
"a": 1,
"b": 1,
"g": 1,
"r": 1
},
"label": "",
"name": "out_max",
"type": "color"
}
]
},
"type": "shader"
}

View File

@ -1,90 +0,0 @@
{
"name": "tones_map",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"in_max": 1,
"in_min": 0,
"out_max": 1,
"out_min": 0
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4(0.5 ,0.5, 0.5, 1.0)",
"label": "",
"longdesc": "The input image",
"name": "in",
"shortdesc": "Input",
"type": "rgba"
}
],
"instance": "",
"longdesc": "Maps linearly an input tones interval to an output tones interval.",
"name": "Tones map",
"outputs": [
{
"longdesc": "Shows the generated remapped image",
"rgba": "vec4(vec3($out_min)+($in($uv).rgb-vec3($in_min))*vec3(($out_max-$out_min)/($in_max-$in_min)), $in($uv).a)",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"control": "None",
"default": 0.5,
"label": "Input min",
"longdesc": "The minimum value of the input interval",
"max": 1,
"min": 0,
"name": "in_min",
"shortdesc": "InputMin",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0.5,
"label": "Input max",
"longdesc": "The maximum value of the input interval",
"max": 1,
"min": 0,
"name": "in_max",
"shortdesc": "InputMax",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Output min",
"longdesc": "The minimum value of the output interval",
"max": 1,
"min": 0,
"name": "out_min",
"shortdesc": "OutputMin",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0.5,
"label": "Output max",
"longdesc": "The maximum value of the output interval",
"max": 1,
"min": 0,
"name": "out_max",
"shortdesc": "OutputMax",
"step": 0.01,
"type": "float"
}
],
"shortdesc": "Tones map"
},
"type": "shader"
}

View File

@ -1,86 +0,0 @@
{
"name": "tones_range",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"contrast": 0.5,
"invert": false,
"value": 0.5,
"width": 0.25
},
"shader_model": {
"code": "float $(name_uv)_step = clamp(($in($uv) - ($value))/max(0.0001, $width)+0.5, 0.0, 1.0);\nfloat $(name_uv)_false = clamp((min($(name_uv)_step, 1.0-$(name_uv)_step) * 2.0) / (1.0 - $contrast), 0.0, 1.0);\nfloat $(name_uv)_true = 1.0-$(name_uv)_false;",
"global": "",
"inputs": [
{
"default": "($uv.x + $uv.y) / 2.0",
"label": "",
"longdesc": "The input image",
"name": "in",
"shortdesc": "Input",
"type": "f"
}
],
"instance": "",
"longdesc": "Outputs the tone range around a specified value,",
"name": "Tones Range",
"outputs": [
{
"f": "$(name_uv)_$invert",
"longdesc": "Shows the generated high contrast image",
"shortdesc": "Output",
"type": "f"
}
],
"parameters": [
{
"control": "None",
"default": 0.5,
"label": "Value",
"longdesc": "The center value of the selection",
"max": 1,
"min": 0,
"name": "value",
"shortdesc": "Value",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0.25,
"label": "Width",
"longdesc": "The width (in tones space) of the selection area",
"max": 1,
"min": 0,
"name": "width",
"shortdesc": "Width",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0.5,
"label": "Contrast",
"longdesc": "Adjusts the falloff of the output",
"max": 1,
"min": 0,
"name": "contrast",
"shortdesc": "Contrast",
"step": 0.01,
"type": "float"
},
{
"default": false,
"label": "Invert",
"longdesc": "Invert the generated image if set",
"name": "invert",
"shortdesc": "Invert",
"type": "boolean"
}
],
"shortdesc": "Tones Range"
},
"type": "shader"
}

View File

@ -1,73 +0,0 @@
{
"name": "tones_step",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"invert": false,
"value": 0.5,
"width": 0.1
},
"shader_model": {
"code": "vec3 $(name_uv)_false = clamp(($in($uv).rgb-vec3($value))/max(0.0001, $width)+vec3(0.5), vec3(0.0), vec3(1.0));\nvec3 $(name_uv)_true = vec3(1.0)-$(name_uv)_false;",
"global": "",
"inputs": [
{
"default": "vec4(0.5 ,0.5, 0.5, 1.0)",
"label": "",
"longdesc": "The input image",
"name": "in",
"shortdesc": "Input",
"type": "rgba"
}
],
"instance": "",
"longdesc": "Emphasizes dark and light tones around a specified value",
"name": "Tones step",
"outputs": [
{
"longdesc": "Shows the generated high contrast image",
"rgba": "vec4($(name_uv)_$invert, $in($uv).a)",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"control": "None",
"default": 0.5,
"label": "Value",
"longdesc": "The value of the input that separate dark and light zones of the result",
"max": 1,
"min": 0,
"name": "value",
"shortdesc": "Value",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Width",
"longdesc": "The width (in tones space) of the transition area",
"max": 1,
"min": 0,
"name": "width",
"shortdesc": "width",
"step": 0.01,
"type": "float"
},
{
"default": false,
"label": "Invert",
"longdesc": "Invert the generated image if set",
"name": "invert",
"shortdesc": "Invert",
"type": "boolean"
}
],
"shortdesc": "Tones step"
},
"type": "shader"
}

View File

@ -1,50 +0,0 @@
{
"name": "uniform",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"color": {
"a": 1,
"b": 1,
"g": 0.415686,
"r": 0,
"type": "Color"
}
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
],
"instance": "",
"longdesc": "Draws a uniform image",
"name": "Uniform",
"outputs": [
{
"longdesc": "A uniform image of the selected color",
"rgba": "$(color)",
"shortdesc": "Output",
"type": "rgba"
}
],
"parameters": [
{
"default": {
"a": 1,
"b": 1,
"g": 1,
"r": 1
},
"label": "",
"longdesc": "Color of the uniform image",
"name": "color",
"shortdesc": "Color",
"type": "color"
}
]
},
"type": "shader"
}

View File

@ -1,43 +0,0 @@
{
"name": "uniform_greyscale",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"color": 0.5
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
],
"instance": "",
"longdesc": "Draws a uniform greyscale image",
"name": "Greyscale Uniform",
"outputs": [
{
"f": "$(color)",
"longdesc": "A uniform image of the selected value",
"shortdesc": "Output",
"type": "f"
}
],
"parameters": [
{
"control": "None",
"default": 0.5,
"label": "",
"longdesc": "The value of the uniform greyscale image",
"max": 1,
"min": 0,
"name": "color",
"shortdesc": "Value",
"step": 0.01,
"type": "float"
}
]
},
"type": "shader"
}