diff --git a/shaderV/rgba/noise/perlin3d.gd b/shaderV/rgba/noise/perlin3d.gd deleted file mode 100644 index 8695bcb..0000000 --- a/shaderV/rgba/noise/perlin3d.gd +++ /dev/null @@ -1,74 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeNoisePerlin3d - -func _init(): - set_input_port_default_value(1, Vector3(0, 0, 0)) - set_input_port_default_value(2, 5.0) - set_input_port_default_value(3, 0.0) - -func _get_name() -> String: - return "PerlinNoise3D" - -func _get_category() -> String: - return "RGBA" - -func _get_subcategory() -> String: - return "Noise" - -func _get_description() -> String: - return "Classic 3d perlin noise" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_input_port_count() -> int: - return 4 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "offset" - 2: - return "scale" - 3: - return "time" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 2: - return VisualShaderNode.PORT_TYPE_SCALAR - 3: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int): - match port: - 0: - return "result" - -func _get_output_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/perlin3d.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s = _perlin3dNoiseFunc(vec3((%s.xy+%s.xy) * %s, %s));" % [ -output_vars[0], uv, input_vars[1], input_vars[2], input_vars[3]] diff --git a/shaderV/rgba/noise/perlin3d.gdshaderinc b/shaderV/rgba/noise/perlin3d.gdshaderinc deleted file mode 100644 index 0c5568a..0000000 --- a/shaderV/rgba/noise/perlin3d.gdshaderinc +++ /dev/null @@ -1,70 +0,0 @@ -float _perlin3dNoiseFunc(vec3 P) { - vec3 Pi0 = floor(P); - vec3 Pi1 = Pi0 + vec3(1.0); - Pi0 = Pi0 - floor(Pi0 * (1.0 / 289.0)) * 289.0; - Pi1 = Pi1 - floor(Pi1 * (1.0 / 289.0)) * 289.0; - vec3 Pf0 = fract(P); - vec3 Pf1 = Pf0 - vec3(1.0); - vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - vec4 iy = vec4(Pi0.yy, Pi1.yy); - vec4 iz0 = vec4(Pi0.z); - vec4 iz1 = vec4(Pi1.z); - - vec4 ixy = (((((((ix*34.0)+1.0)*ix)-floor(((ix*34.0)+1.0)*ix*(1.0/289.0))*289.0 + iy)*34.0)+1.0)* - ((((ix*34.0)+1.0)*ix)-floor(((ix*34.0)+1.0)*ix*(1.0/289.0))*289.0 + iy))- - floor(((((((ix*34.0)+1.0)*ix)-floor(((ix*34.0)+1.0)*ix*(1.0/289.0))*289.0 + iy)*34.0)+1.0)* - ((((ix*34.0)+1.0)*ix)-floor(((ix*34.0)+1.0)*ix*(1.0/289.0))*289.0 + iy)*(1.0/289.0))*289.0; - vec4 ixy0 = ((((ixy + iz0)*34.0)+1.0)*(ixy + iz0))-floor((((ixy + iz0)*34.0)+1.0)*(ixy + iz0)*(1.0/289.0))*289.0; - vec4 ixy1 = ((((ixy + iz1)*34.0)+1.0)*(ixy + iz1))-floor((((ixy + iz1)*34.0)+1.0)*(ixy + iz1)*(1.0/289.0))*289.0; - - vec4 gx0 = ixy0 * (1.0 / 7.0); - vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5; - gx0 = fract(gx0); - vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0); - vec4 sz0 = step(gz0, vec4(0.0)); - gx0 -= sz0 * (step(0.0, gx0) - 0.5); - gy0 -= sz0 * (step(0.0, gy0) - 0.5); - - vec4 gx1 = ixy1 * (1.0 / 7.0); - vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5; - gx1 = fract(gx1); - vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1); - vec4 sz1 = step(gz1, vec4(0.0)); - gx1 -= sz1 * (step(0.0, gx1) - 0.5); - gy1 -= sz1 * (step(0.0, gy1) - 0.5); - - vec3 g000 = vec3(gx0.x,gy0.x,gz0.x); - vec3 g100 = vec3(gx0.y,gy0.y,gz0.y); - vec3 g010 = vec3(gx0.z,gy0.z,gz0.z); - vec3 g110 = vec3(gx0.w,gy0.w,gz0.w); - vec3 g001 = vec3(gx1.x,gy1.x,gz1.x); - vec3 g101 = vec3(gx1.y,gy1.y,gz1.y); - vec3 g011 = vec3(gx1.z,gy1.z,gz1.z); - vec3 g111 = vec3(gx1.w,gy1.w,gz1.w); - - vec4 norm0 = 1.79284291400159 - 0.85373472095314 * vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)); - g000 *= norm0.x; - g010 *= norm0.y; - g100 *= norm0.z; - g110 *= norm0.w; - vec4 norm1 = 1.79284291400159 - 0.85373472095314 * vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)); - g001 *= norm1.x; - g011 *= norm1.y; - g101 *= norm1.z; - g111 *= norm1.w; - - float n000 = dot(g000, Pf0); - float n100 = dot(g100, vec3(Pf1.x, Pf0.yz)); - float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z)); - float n110 = dot(g110, vec3(Pf1.xy, Pf0.z)); - float n001 = dot(g001, vec3(Pf0.xy, Pf1.z)); - float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z)); - float n011 = dot(g011, vec3(Pf0.x, Pf1.yz)); - float n111 = dot(g111, Pf1); - - vec3 fade_xyz = Pf0 * Pf0 * Pf0 * (Pf0 * (Pf0 * 6.0 - 15.0) + 10.0); - vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z); - vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y); - float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); - return (2.2 * n_xyz + 1.0) * 0.5; -} \ No newline at end of file diff --git a/shaderV/rgba/noise/worley2x2x2.gd b/shaderV/rgba/noise/worley2x2x2.gd deleted file mode 100644 index 8270ea7..0000000 --- a/shaderV/rgba/noise/worley2x2x2.gd +++ /dev/null @@ -1,75 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeNoiseWorley2x2x2 - -func _init(): - set_input_port_default_value(1, Vector3(0, 0, 0)) - set_input_port_default_value(2, 5.0) - set_input_port_default_value(3, 1.0) - set_input_port_default_value(4, 0.0) - -func _get_name() -> String: - return "WorleyNoise2x2x2" - -func _get_category() -> String: - return "RGBA" - -func _get_subcategory() -> String: - return "Noise" - -func _get_description() -> String: - return "2x2x2 worley noise" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_input_port_count() -> int: - return 5 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "offset" - 2: - return "scale" - 3: - return "jitter" - 4: - return "time" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 2: - return VisualShaderNode.PORT_TYPE_SCALAR - 3: - return VisualShaderNode.PORT_TYPE_SCALAR - 4: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "F1" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/worley2x2x2.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s = _cellular2x2x2NoiseFunc(vec3((%s.xy + %s.xy) * %s, %s), min(max(%s, 0.0), 1.0));" % [ -output_vars[0], uv, input_vars[1], input_vars[2], input_vars[4], input_vars[3]] diff --git a/shaderV/rgba/noise/worley2x2x2.gdshaderinc b/shaderV/rgba/noise/worley2x2x2.gdshaderinc deleted file mode 100644 index 4e49548..0000000 --- a/shaderV/rgba/noise/worley2x2x2.gdshaderinc +++ /dev/null @@ -1,34 +0,0 @@ -float _cellular2x2x2NoiseFunc(vec3 P, float _jitter_w2x2x2) { - float K = 0.142857142857; - float Ko = 0.428571428571; - float K2 = 0.020408163265306; - float Kz = 0.166666666667; - float Kzo = 0.416666666667; - - vec3 Pi = floor(P)- floor(floor(P) * (1.0 / 289.0)) * 289.0; - vec3 Pf = fract(P); - vec4 Pfx = Pf.x + vec4(0.0, -1.0, 0.0, -1.0); - vec4 Pfy = Pf.y + vec4(0.0, 0.0, -1.0, -1.0); - vec4 p = (34.0*(Pi.x+vec4(0.0,1.0,0.0,1.0))+1.0)*(Pi.x+vec4(0.0,1.0,0.0,1.0))-floor((34.0*(Pi.x+vec4(0.0,1.0,0.0,1.0))+1.0)*(Pi.x+vec4(0.0,1.0,0.0,1.0))*(1.0/289.0))*289.0; - p = (34.0*(p+Pi.y+vec4(0.0,0.0,1.0,1.0))+1.0)*(p+Pi.y+vec4(0.0,0.0,1.0,1.0))-floor((34.0*(p+Pi.y+vec4(0.0,0.0,1.0,1.0))+1.0)*(p+Pi.y+vec4(0.0,0.0,1.0,1.0))*(1.0/289.0))*289.0; - vec4 p1 = (34.0*(p+Pi.z)+1.0)*(p+Pi.z)-floor((34.0*(p+Pi.z)+1.0)*(p+Pi.z)*(1.0/289.0))*289.0; - vec4 p2 = (34.0*(p+Pi.z+vec4(1.0))+1.0)*(p+Pi.z+vec4(1.0))-floor((34.0*(p+Pi.z+vec4(1.0))+1.0)*(p+Pi.z+vec4(1.0))*(1.0/289.0))*289.0; - vec4 ox1 = fract(p1*K) - Ko; - vec4 oy1 = (floor(p1*K) - floor(floor(p1*K) * (1.0 / 7.0)) * 7.0)*K - Ko; - vec4 oz1 = floor(p1*K2)*Kz - Kzo; - vec4 ox2 = fract(p2*K) - Ko; - vec4 oy2 = (floor(p2*K) - floor(floor(p2*K) * (1.0 / 7.0)) * 7.0)*K - Ko; - vec4 oz2 = floor(p2*K2)*Kz - Kzo; - vec4 dx1 = Pfx + _jitter_w2x2x2*ox1; - vec4 dy1 = Pfy + _jitter_w2x2x2*oy1; - vec4 dz1 = Pf.z + _jitter_w2x2x2*oz1; - vec4 dx2 = Pfx + _jitter_w2x2x2*ox2; - vec4 dy2 = Pfy + _jitter_w2x2x2*oy2; - vec4 dz2 = Pf.z - 1.0 + _jitter_w2x2x2*oz2; - vec4 d1 = dx1 * dx1 + dy1 * dy1 + dz1 * dz1; - vec4 d2 = dx2 * dx2 + dy2 * dy2 + dz2 * dz2; - d1 = min(d1, d2); - d1.xy = min(d1.xy, d1.wz); - d1.x = min(d1.x, d1.y); - return sqrt(d1.x); -} \ No newline at end of file diff --git a/shaderV/shaderV_icon.png b/shaderV/shaderV_icon.png deleted file mode 100644 index 0a03e2e..0000000 Binary files a/shaderV/shaderV_icon.png and /dev/null differ diff --git a/shaderV/shaderV_icon.png.import b/shaderV/shaderV_icon.png.import deleted file mode 100644 index bee22c9..0000000 --- a/shaderV/shaderV_icon.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dukgbairam5vc" -path="res://.godot/imported/shaderV_icon.png-dcb5b8e5cf2de0310a462742f72ac160.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://shaderV/shaderV_icon.png" -dest_files=["res://.godot/imported/shaderV_icon.png-dcb5b8e5cf2de0310a462742f72ac160.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=true -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=true -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=0 diff --git a/shaderV/tools/TimeScaled.gd b/shaderV/tools/TimeScaled.gd deleted file mode 100644 index 7fa4eb3..0000000 --- a/shaderV/tools/TimeScaled.gd +++ /dev/null @@ -1,42 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsTIMEscaled - -func _init(): - set_input_port_default_value(0, 1.0) - -func _get_name() -> String: - return "ScaledTIME" - -func _get_category() -> String: - return "Tools" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Returns [scale] * TIME" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_input_port_count() -> int: - return 1 - -func _get_input_port_name(port: int) -> String: - return "scale" - -func _get_input_port_type(port): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "out" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_code(input_vars, output_vars, mode, type): - return "%s = %s * TIME;" % [output_vars[0], input_vars[0]] diff --git a/shaderV/tools/random/hash1d.gd b/shaderV/tools/random/hash1d.gd deleted file mode 100644 index e4cec54..0000000 --- a/shaderV/tools/random/hash1d.gd +++ /dev/null @@ -1,40 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsHash - -func _get_name() -> String: - return "HashRandom1d" - -func _get_category() -> String: - return "Tools" - -func _get_subcategory() -> String: - return "Random" - -func _get_description() -> String: - return "Hash func with scalar input and scalar output" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_input_port_count() -> int: - return 1 - -func _get_input_port_name(port: int) -> String: - return "in" - -func _get_input_port_type(port): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "rand" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_code(input_vars, output_vars, mode, type): - return output_vars[0] + " = fract(sin(" + input_vars[0] + ") * 1e4);" - diff --git a/shaderV/tools/random/hash2d.gd b/shaderV/tools/random/hash2d.gd deleted file mode 100644 index 44a637a..0000000 --- a/shaderV/tools/random/hash2d.gd +++ /dev/null @@ -1,44 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsHash2D - -func _get_name() -> String: - return "HashRandom2d" - -func _get_category() -> String: - return "Tools" - -func _get_subcategory() -> String: - return "Random" - -func _get_description() -> String: - return "Hash func with vector input and scalar output" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_input_port_count() -> int: - return 1 - -func _get_input_port_name(port: int) -> String: - return "in" - -func _get_input_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port ) -> String: - return "rand" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_code(input_vars, output_vars, mode, type): - return output_vars[0] + " = fract(1e4 * sin(17.0 * %s.x + %s.y * 0.1) * (0.1 + abs(sin(%s.y * 13.0 + %s.x))));" % [ - input_vars[0], input_vars[0], input_vars[0], input_vars[0]] - - - - diff --git a/shaderV/tools/random/hash2dvector.gd b/shaderV/tools/random/hash2dvector.gd deleted file mode 100644 index f0f34ee..0000000 --- a/shaderV/tools/random/hash2dvector.gd +++ /dev/null @@ -1,43 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsHash2Dvec - -func _get_name() -> String: - return "HashRandom2dVec" - -func _get_category() -> String: - return "Tools" - -func _get_subcategory() -> String: - return "Random" - -func _get_description() -> String: - return "Hash func with vector input and vector output" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 1 - -func _get_input_port_name(port: int) -> String: - return "in" - -func _get_input_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port ) -> String: - return "vec" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/hash2dvector.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - return "%s = vec3(_hash2v(%s.xy), 0.0);" % [output_vars[0], input_vars[0]] diff --git a/shaderV/tools/random/hash2dvector.gdshaderinc b/shaderV/tools/random/hash2dvector.gdshaderinc deleted file mode 100644 index 025f5fb..0000000 --- a/shaderV/tools/random/hash2dvector.gdshaderinc +++ /dev/null @@ -1,4 +0,0 @@ -vec2 _hash2v(vec2 co) { - float _tmp_h = dot(co, vec2(12.9898, 78.233)); - return fract(vec2(sin(_tmp_h), cos(_tmp_h)) * 43758.5453) * 2.0 - 1.0; -} \ No newline at end of file diff --git a/shaderV/tools/random/randomFloat.gd b/shaderV/tools/random/randomFloat.gd deleted file mode 100644 index a8c1e63..0000000 --- a/shaderV/tools/random/randomFloat.gd +++ /dev/null @@ -1,47 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsRandomFloat - -func _init(): - pass - -func _get_name() -> String: - return "RandomFloat" - -func _get_category() -> String: - return "Tools" - -func _get_subcategory() -> String: - return "Random" - -func _get_description() -> String: - return "Returns random float based on input value. UV is default input value." - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_input_port_count() -> int: - return 1 - -func _get_input_port_name(port: int) -> String: - return "in" - -func _get_input_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "rand" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return output_vars[0] + " = fract(sin(dot(%s.xy, vec2(12.9898, 78.233))) * 43758.5453123);" % uv diff --git a/shaderV/tools/random/randomFloat4D.gd b/shaderV/tools/random/randomFloat4D.gd deleted file mode 100644 index b24d753..0000000 --- a/shaderV/tools/random/randomFloat4D.gd +++ /dev/null @@ -1,68 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsRandomFloat4D - -func _init(): - set_input_port_default_value(1, 1.0) - -func _get_name() -> String: - return "RandomFloat4D" - -func _get_category() -> String: - return "Tools" - -func _get_subcategory() -> String: - return "Random" - -func _get_description() -> String: - return "Returns random float value based on 4D input vector" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_input_port_count() -> int: - return 3 - -func _get_input_port_name(port: int): - match port: - 0: - return "input" - 1: - return "scale" - 2: - return "offset" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_4D - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - 2: - return VisualShaderNode.PORT_TYPE_VECTOR_4D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "rnd" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/randomFloat4D.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var input = input_vars[0] - var offset = input_vars[2] - - # See https://github.com/godotengine/godot/pull/90850 - if not input: - input = 'vec4(0)' - if not offset: - offset = 'vec4(0)' - - return "%s = _randFloat4D(%s * %s + %s);" % [ - output_vars[0], input, input_vars[1], offset] diff --git a/shaderV/tools/random/randomFloat4D.gdshaderinc b/shaderV/tools/random/randomFloat4D.gdshaderinc deleted file mode 100644 index 21e00cc..0000000 --- a/shaderV/tools/random/randomFloat4D.gdshaderinc +++ /dev/null @@ -1,4 +0,0 @@ -highp float _randFloat4D(vec4 input) { - float f = dot(fract(input) + fract(input * 2.32184321231),vec4(129.898,782.33,944.32214932,122.2834234542)); - return fract(sin(f) * 437588.5453); -} diff --git a/shaderV/tools/random/randomFloatImproved.gd b/shaderV/tools/random/randomFloatImproved.gd deleted file mode 100644 index c3d4cf4..0000000 --- a/shaderV/tools/random/randomFloatImproved.gd +++ /dev/null @@ -1,65 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsRandomFloatImproved - -func _init(): - set_input_port_default_value(1, 1.0) - set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0)) - -func _get_name() -> String: - return "RandomFloatImproved" - -func _get_category() -> String: - return "Tools" - -func _get_subcategory() -> String: - return "Random" - -func _get_description() -> String: - return "Improved version of classic random function. Classic random can produce artifacts. This one - doesn't." - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_input_port_count() -> int: - return 3 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "scale" - 2: - return "offset" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - 2: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "rnd" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/randomFloatImproved.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s = _randImproved(%s.xy * %s + %s.xy);" % [ -output_vars[0], uv, input_vars[1], input_vars[2]] diff --git a/shaderV/tools/random/randomFloatImproved.gdshaderinc b/shaderV/tools/random/randomFloatImproved.gdshaderinc deleted file mode 100644 index 862ace2..0000000 --- a/shaderV/tools/random/randomFloatImproved.gdshaderinc +++ /dev/null @@ -1,8 +0,0 @@ -highp float _randImproved(vec2 _co_rnd){ - highp float _tmp_a_rnd = 12.9898; - highp float _tmp_b_rnd = 78.233; - highp float _tmp_c_rnd = 43758.5453; - highp float _tmp_dt_rnd = dot(_co_rnd, vec2(_tmp_a_rnd, _tmp_b_rnd)); - highp float _tmp_sn_rnd = mod(_tmp_dt_rnd, 3.14); - return fract(sin(_tmp_sn_rnd) * _tmp_c_rnd); -} \ No newline at end of file diff --git a/shaderV/tools/random/randomGoldNoiseFloat.gd b/shaderV/tools/random/randomGoldNoiseFloat.gd deleted file mode 100644 index e3cd0d6..0000000 --- a/shaderV/tools/random/randomGoldNoiseFloat.gd +++ /dev/null @@ -1,61 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsRandomFloatGoldenRation - -func _init(): - set_input_port_default_value(0, Vector3(0, 0, 0)) - set_input_port_default_value(1, Vector3(0, 0, 0)) - set_input_port_default_value(2, 0.0) - -func _get_name() -> String: - return "RandomGoldRatio" - -func _get_category() -> String: - return "Tools" - -func _get_subcategory() -> String: - return "Random" - -func _get_description() -> String: - return "Random float based on golden ratio" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_input_port_count() -> int: - return 3 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "offset" - 2: - return "seed" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 2: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port) -> String: - return "rand" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/randomGoldNoiseFloat.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - return "%s = _randomGoldRatioFunc(%s.xy, %s.xy, %s);" % [ - output_vars[0], input_vars[0], input_vars[1], input_vars[2]] diff --git a/shaderV/tools/random/randomGoldNoiseFloat.gdshaderinc b/shaderV/tools/random/randomGoldNoiseFloat.gdshaderinc deleted file mode 100644 index 9c0df35..0000000 --- a/shaderV/tools/random/randomGoldNoiseFloat.gdshaderinc +++ /dev/null @@ -1,5 +0,0 @@ -float _randomGoldRatioFunc(vec2 _coord_gn, vec2 _scale_gn, float _seed_gn){ - float PHI = 1.6180339887; - float SQ2 = 1.4142135624; - return fract(tan(distance((_coord_gn + _scale_gn) * (_seed_gn + PHI), vec2(PHI, PI))) * SQ2); -} \ No newline at end of file diff --git a/shaderV/tools/relay.gd b/shaderV/tools/relay.gd deleted file mode 100644 index dd876e3..0000000 --- a/shaderV/tools/relay.gd +++ /dev/null @@ -1,42 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsRelay - -# Almost completely useless node xD - -func _get_name() -> String: - return "Relay" - -func _get_category() -> String: - return "Tools" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Outputs its input, may be useful for organizing node connections. Works with booleans, vectors and scalars. Also can be used as preview node" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_MAX - -func _get_input_port_count() -> int: - return 1 - -func _get_input_port_name(port: int) -> String: - return "i" - -func _get_input_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "o" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_code(input_vars, output_vars, mode, type): - return output_vars[0] + " = " + input_vars[0] - diff --git a/shaderV/tools/remap.gd b/shaderV/tools/remap.gd deleted file mode 100644 index 8e67ffb..0000000 --- a/shaderV/tools/remap.gd +++ /dev/null @@ -1,80 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsRemap - -func _init(): - set_input_port_default_value(1, 0.0) - set_input_port_default_value(2, 1.0) - set_input_port_default_value(3, -1.0) - set_input_port_default_value(4, 1.0) - -func _get_name() -> String: - return "Remap" - -func _get_category() -> String: - return "Tools" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Remaps input value from ( [inMin], [inMax] ) range to ( [outMin], [outMax] ). UV is default input value." - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 5 - -func _get_input_port_name(port: int): - match port: - 0: - return "input" - 1: - return "inMin" - 2: - return "inMin" - 3: - return "outMin" - 4: - return "outMax" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - 2: - return VisualShaderNode.PORT_TYPE_SCALAR - 3: - return VisualShaderNode.PORT_TYPE_SCALAR - 4: - return VisualShaderNode.PORT_TYPE_SCALAR - - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port ) -> String: - return "out" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/remap.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return output_vars[0] + " = _remapFunc(%s, vec2(%s, %s), vec2(%s, %s));" % [ - uv, input_vars[1], input_vars[2], input_vars[3], input_vars[4]] - - - - diff --git a/shaderV/tools/remap.gdshaderinc b/shaderV/tools/remap.gdshaderinc deleted file mode 100644 index 2245d16..0000000 --- a/shaderV/tools/remap.gdshaderinc +++ /dev/null @@ -1,3 +0,0 @@ -vec3 _remapFunc(vec3 _remap_input, vec2 _remap_from, vec2 _remap_to){ - return _remap_to.x + ((_remap_input - _remap_from.x) * (_remap_to.y - _remap_to.x)) / (_remap_from.y - _remap_from.x); -} \ No newline at end of file diff --git a/shaderV/tools/sinTime.gd b/shaderV/tools/sinTime.gd deleted file mode 100644 index 3a72cf0..0000000 --- a/shaderV/tools/sinTime.gd +++ /dev/null @@ -1,51 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsSinTIME - -func _init(): - set_input_port_default_value(0, 1.0) - set_input_port_default_value(1, 1.0) - -func _get_name() -> String: - return "SinTIME" - -func _get_category() -> String: - return "Tools" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Returns [amplitude] * sin([speed] * TIME)" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_input_port_count() -> int: - return 2 - -func _get_input_port_name(port: int): - match port: - 0: - return "speed" - 1: - return "amplitude" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_SCALAR - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "out" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_code(input_vars, output_vars, mode, type): - return output_vars[0] + " = %s * sin(%s * TIME);" % [input_vars[1], input_vars[0]] diff --git a/shaderV/tools/transformCoordinates/cartesianToPolar.gd b/shaderV/tools/transformCoordinates/cartesianToPolar.gd deleted file mode 100644 index 26de930..0000000 --- a/shaderV/tools/transformCoordinates/cartesianToPolar.gd +++ /dev/null @@ -1,53 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsCartesianToPolar - -func _init(): - set_input_port_default_value(0, Vector3(1.0, 1.0, 0.0)) - -func _get_name() -> String: - return "CartesianToPolar" - -func _get_category() -> String: - return "Tools" - -func _get_subcategory(): - return "TransformCoordinates" - -func _get_description() -> String: - return "Cartesian (x, y) -> Polar (r, theta). By default (x, y) is UV." - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 1 - -func _get_input_port_name(port: int) -> String: - return "cartesian" - -func _get_input_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port ) -> String: - return "polar" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/cartesianToPolar.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s = vec3(_cartesianToPolarFunc(%s.xy), %s.z);" % [output_vars[0], uv, uv] - diff --git a/shaderV/tools/transformCoordinates/cartesianToPolar.gdshaderinc b/shaderV/tools/transformCoordinates/cartesianToPolar.gdshaderinc deleted file mode 100644 index 0698267..0000000 --- a/shaderV/tools/transformCoordinates/cartesianToPolar.gdshaderinc +++ /dev/null @@ -1,4 +0,0 @@ -vec2 _cartesianToPolarFunc(vec2 _cartesian_vec2){ -// (x, y) -> (r, theta) - return vec2(length(_cartesian_vec2), atan(_cartesian_vec2.y, _cartesian_vec2.x)); -} diff --git a/shaderV/tools/transformCoordinates/cartesianToSpherical.gd b/shaderV/tools/transformCoordinates/cartesianToSpherical.gd deleted file mode 100644 index f6724ac..0000000 --- a/shaderV/tools/transformCoordinates/cartesianToSpherical.gd +++ /dev/null @@ -1,53 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsCartesianToSpherical - -func _init(): - set_input_port_default_value(0, Vector3(1.0, 1.0, 1.0)) - -func _get_name() -> String: - return "CartesianToSpherical" - -func _get_category() -> String: - return "Tools" - -func _get_subcategory(): - return "TransformCoordinates" - -func _get_description() -> String: - return "Cartesian (x, y, z) -> Spherical (r, theta, phi). By default (x, y, z) is UV." - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 1 - -func _get_input_port_name(port: int) -> String: - return "cartesian" - -func _get_input_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port ) -> String: - return "spherical" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/cartesianToSpherical.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s = _cartesianToSphericalFunc(%s);" % [output_vars[0], uv] - diff --git a/shaderV/tools/transformCoordinates/cartesianToSpherical.gdshaderinc b/shaderV/tools/transformCoordinates/cartesianToSpherical.gdshaderinc deleted file mode 100644 index 8f7b055..0000000 --- a/shaderV/tools/transformCoordinates/cartesianToSpherical.gdshaderinc +++ /dev/null @@ -1,6 +0,0 @@ -vec3 _cartesianToSphericalFunc(vec3 _cartesian_vec3){ -// (x, y, z) -> (r, theta, phi) - return vec3(length(_cartesian_vec3), - atan(_cartesian_vec3.y, _cartesian_vec3.x), - atan(length(_cartesian_vec3.xy), _cartesian_vec3.z)); -} \ No newline at end of file diff --git a/shaderV/tools/transformCoordinates/polarToCartesian.gd b/shaderV/tools/transformCoordinates/polarToCartesian.gd deleted file mode 100644 index 3c66fea..0000000 --- a/shaderV/tools/transformCoordinates/polarToCartesian.gd +++ /dev/null @@ -1,48 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsPolarToCartesian - -func _init(): - set_input_port_default_value(0, Vector3(1.0, 1.0, 0.0)) - -func _get_name() -> String: - return "PolarToCartesian" - -func _get_category() -> String: - return "Tools" - -func _get_subcategory(): - return "TransformCoordinates" - -func _get_description() -> String: - return "Polar (r, theta) -> Cartesian (x, y)" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 1 - -func _get_input_port_name(port: int) -> String: - return "polar" - -func _get_input_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port ) -> String: - return "cartesian" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/polarToCartesian.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - return "%s = vec3(_polarToCartesianFunc(%s.xy), %s.z);" % [output_vars[0], input_vars[0], input_vars[0]] - diff --git a/shaderV/tools/transformCoordinates/polarToCartesian.gdshaderinc b/shaderV/tools/transformCoordinates/polarToCartesian.gdshaderinc deleted file mode 100644 index b1dd373..0000000 --- a/shaderV/tools/transformCoordinates/polarToCartesian.gdshaderinc +++ /dev/null @@ -1,5 +0,0 @@ -vec2 _polarToCartesianFunc(vec2 _polar_vec2){ -// (r, theta) -> (x, y) - return vec2(_polar_vec2.x * cos(_polar_vec2.y), - _polar_vec2.x * sin(_polar_vec2.y)); -} \ No newline at end of file diff --git a/shaderV/tools/transformCoordinates/sphericalToCartesian.gd b/shaderV/tools/transformCoordinates/sphericalToCartesian.gd deleted file mode 100644 index 3f0af2f..0000000 --- a/shaderV/tools/transformCoordinates/sphericalToCartesian.gd +++ /dev/null @@ -1,48 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsSphericalToCartesian - -func _init(): - set_input_port_default_value(0, Vector3(1.0, 1.0, 1.0)) - -func _get_name() -> String: - return "SphericalToCartesian" - -func _get_category() -> String: - return "Tools" - -func _get_subcategory(): - return "TransformCoordinates" - -func _get_description() -> String: - return "Spherical (r, theta, phi) -> Cartesian (x, y, z)" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 1 - -func _get_input_port_name(port: int) -> String: - return "spherical" - -func _get_input_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port ) -> String: - return "cartesian" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/sphericalToCartesian.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - return "%s = _sphericalToCartesianFunc(%s);" % [output_vars[0], input_vars[0]] - diff --git a/shaderV/tools/transformCoordinates/sphericalToCartesian.gdshaderinc b/shaderV/tools/transformCoordinates/sphericalToCartesian.gdshaderinc deleted file mode 100644 index 7df7812..0000000 --- a/shaderV/tools/transformCoordinates/sphericalToCartesian.gdshaderinc +++ /dev/null @@ -1,6 +0,0 @@ -vec3 _sphericalToCartesianFunc(vec3 _spherical_vec3){ -// (r, theta, phi) -> (x, y, z) - return vec3(_spherical_vec3.x * sin(_spherical_vec3.z) * cos(_spherical_vec3.y), - _spherical_vec3.x * sin(_spherical_vec3.z) * sin(_spherical_vec3.y), - _spherical_vec3.x * cos(_spherical_vec3.z)); -} \ No newline at end of file diff --git a/shaderV/tools/uv/animated/distortionUVAnimated.gd b/shaderV/tools/uv/animated/distortionUVAnimated.gd deleted file mode 100644 index 77f8071..0000000 --- a/shaderV/tools/uv/animated/distortionUVAnimated.gd +++ /dev/null @@ -1,85 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVdistortionAnimated - -func _init(): - set_input_port_default_value(1, 0.0) - set_input_port_default_value(2, 0.0) - set_input_port_default_value(3, 0.0) - set_input_port_default_value(4, 0.0) - set_input_port_default_value(5, 1.0) - set_input_port_default_value(6, 0.0) - -func _get_name() -> String: - return "DistortionUVAnimated" - -func _get_category() -> String: - return "UV" - -func _get_subcategory() -> String: - return "Animated" - -func _get_description() -> String: - return "Animated wave-like UV distortion" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 7 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "waveX" - 2: - return "waveY" - 3: - return "distortX" - 4: - return "distortY" - 5: - return "speed" - 6: - return "time" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - 2: - return VisualShaderNode.PORT_TYPE_SCALAR - 3: - return VisualShaderNode.PORT_TYPE_SCALAR - 4: - return VisualShaderNode.PORT_TYPE_SCALAR - 5: - return VisualShaderNode.PORT_TYPE_SCALAR - 6: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/distortionUVAnimated.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _distortionUVAnimatedFunc(%s.xy, %s, %s, %s, %s, %s, %s);" % [ - output_vars[0], uv, input_vars[3], input_vars[4], input_vars[1], input_vars[2], input_vars[5], input_vars[6]] diff --git a/shaderV/tools/uv/animated/distortionUVAnimated.gdshaderinc b/shaderV/tools/uv/animated/distortionUVAnimated.gdshaderinc deleted file mode 100644 index 5095a09..0000000 --- a/shaderV/tools/uv/animated/distortionUVAnimated.gdshaderinc +++ /dev/null @@ -1,5 +0,0 @@ -vec2 _distortionUVAnimatedFunc(vec2 _uv_dist, float _distX_dist, float _distY_dist, float _waveX_dist, float _waveY_dist, float _spd_dist, float _time_dist){ - _uv_dist.x += sin(_uv_dist.y * _waveX_dist + _time_dist * _spd_dist) * _distX_dist; - _uv_dist.y += sin(_uv_dist.x * _waveY_dist + _time_dist * _spd_dist) * _distY_dist; - return _uv_dist; -} \ No newline at end of file diff --git a/shaderV/tools/uv/animated/doodleUV.gd b/shaderV/tools/uv/animated/doodleUV.gd deleted file mode 100644 index c6dbbde..0000000 --- a/shaderV/tools/uv/animated/doodleUV.gd +++ /dev/null @@ -1,80 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVdoodle - -func _init(): - set_input_port_default_value(1, 0.5) - set_input_port_default_value(2, 4) - set_input_port_default_value(3, 0.7) - set_input_port_default_value(4, 0.065) - set_input_port_default_value(5, 0.0) - -func _get_name() -> String: - return "DoodleUV" - -func _get_category() -> String: - return "UV" - -func _get_subcategory() -> String: - return "Animated" - -func _get_description() -> String: - return "Doodle UV effect" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 6 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "frameTime" - 2: - return "frameCount" - 3: - return "lacunarity" - 4: - return "maxOffset" - 5: - return "time" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - 2: - return VisualShaderNode.PORT_TYPE_SCALAR - 3: - return VisualShaderNode.PORT_TYPE_SCALAR - 4: - return VisualShaderNode.PORT_TYPE_SCALAR - 5: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/doodleUV.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _doodleUVFunc(%s.xy, %s, %s, %s, int(%s), %s);" % [ - output_vars[0], uv, input_vars[4], input_vars[5], input_vars[1], input_vars[2], input_vars[3]] diff --git a/shaderV/tools/uv/animated/doodleUV.gdshaderinc b/shaderV/tools/uv/animated/doodleUV.gdshaderinc deleted file mode 100644 index d4fa561..0000000 --- a/shaderV/tools/uv/animated/doodleUV.gdshaderinc +++ /dev/null @@ -1,19 +0,0 @@ -float _hash2Doodle(vec2 _p_hash_doodle) { - return fract(1e4 * sin(17.0 * _p_hash_doodle.x + _p_hash_doodle.y * 0.1) * (0.1 + abs(sin(_p_hash_doodle.y * 13.0 + _p_hash_doodle.x)))); -} - -float _noiseDoodle(vec2 _seed_noise_doodle){ - vec2 i = floor(_seed_noise_doodle); - vec2 f = fract(_seed_noise_doodle); - float _a = _hash2Doodle(i); - float _b = _hash2Doodle(i + vec2(1.0, 0.0)); - float _c = _hash2Doodle(i + vec2(0.0, 1.0)); - float _d = _hash2Doodle(i + vec2(1.0, 1.0)); - vec2 u = f * f * (3.0 - 2.0 * f); - return mix(_a, _b, u.x) + (_c - _a) * u.y * (1.0 - u.x) + (_d - _b) * u.x * u.y; -} - -vec2 _doodleUVFunc(vec2 _doodle_uv, float _doodle_max_offset, float _doodle_time, float _doodle_frame_time, int _doodle_frame_count, float _doodle_scale){ - float _timeValueDoodle = mod(floor(_doodle_time / _doodle_frame_time), float(_doodle_frame_count)) + 1.0; - return _doodle_uv + vec2(_noiseDoodle((_doodle_uv + _timeValueDoodle) * _doodle_scale) * 2.0 - 1.0) * _doodle_max_offset; -} \ No newline at end of file diff --git a/shaderV/tools/uv/animated/rotateAnimated.gd b/shaderV/tools/uv/animated/rotateAnimated.gd deleted file mode 100644 index ca8d689..0000000 --- a/shaderV/tools/uv/animated/rotateAnimated.gd +++ /dev/null @@ -1,70 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVrotateAnimated - -func _init(): - set_input_port_default_value(1, 0.5) - set_input_port_default_value(2, Vector3(0.5, 0.5, 0)) - -func _get_name() -> String: - return "RotateUVAnimated" - -func _get_category() -> String: - return "UV" - -func _get_subcategory() -> String: - return "Animated" - -func _get_description() -> String: - return "Animated UV rotation by angle in radians relative to pivot point" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 4 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "angularSpeed" - 2: - return "pivot" - 3: - return "time" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - 2: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 3: - return VisualShaderNode.PORT_TYPE_SCALAR - - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port: int): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/rotateAnimated.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return output_vars[0] + " = vec3(_rotateUVAnimatedFunc(%s.xy, %s.xy, 0.0, %s, %s), 0);" % [ - uv, input_vars[2], input_vars[1], input_vars[3]] diff --git a/shaderV/tools/uv/animated/rotateAnimated.gdshaderinc b/shaderV/tools/uv/animated/rotateAnimated.gdshaderinc deleted file mode 100644 index 8254834..0000000 --- a/shaderV/tools/uv/animated/rotateAnimated.gdshaderinc +++ /dev/null @@ -1,9 +0,0 @@ -vec2 _rotateUVAnimatedFunc(vec2 _uv_rotate, vec2 _pivot_rotate, float _rotation_rotate, float _rotSpeed_rotate, float _time_rotate){ - _rotation_rotate += _time_rotate * _rotSpeed_rotate; - //_rotation_rotate = radians(_rotationDeg_rotate); - vec2 _rotAngle = vec2(cos(_rotation_rotate), sin(_rotation_rotate)); - _uv_rotate -= _pivot_rotate; - _uv_rotate = vec2((_uv_rotate.x*_rotAngle.x-_uv_rotate.y*_rotAngle.y),(_uv_rotate.x*_rotAngle.y+_uv_rotate.y*_rotAngle.x)); - _uv_rotate += _pivot_rotate; - return _uv_rotate; -} \ No newline at end of file diff --git a/shaderV/tools/uv/animated/swirlUV.gd b/shaderV/tools/uv/animated/swirlUV.gd deleted file mode 100644 index cf7d158..0000000 --- a/shaderV/tools/uv/animated/swirlUV.gd +++ /dev/null @@ -1,70 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVswirl - -func _init(): - set_input_port_default_value(1, Vector3(0.5, 0.5, 0.0)) - set_input_port_default_value(2, 0.0) - set_input_port_default_value(3, 0.0) - -func _get_name() -> String: - return "SwirlUV" - -func _get_category() -> String: - return "UV" - -func _get_subcategory() -> String: - return "Animated" - -func _get_description() -> String: - return "Swirl UV effect" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 4 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "pivot" - 2: - return "strength" - 3: - return "sin_time" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 2: - return VisualShaderNode.PORT_TYPE_SCALAR - 3: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/swirlUV.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _swirlUVFunc(%s.xy, %s, %s.xy, %s);" % [ - output_vars[0], uv, input_vars[3], input_vars[1], input_vars[2]] diff --git a/shaderV/tools/uv/animated/swirlUV.gdshaderinc b/shaderV/tools/uv/animated/swirlUV.gdshaderinc deleted file mode 100644 index a808a69..0000000 --- a/shaderV/tools/uv/animated/swirlUV.gdshaderinc +++ /dev/null @@ -1,8 +0,0 @@ -vec2 _swirlUVFunc(vec2 _swirl_uv, float _swirl_time, vec2 _swirl_pivot, float _swirl_amount){ - float _swirl_rotation_index = _swirl_amount * length(_swirl_uv - _swirl_pivot) * _swirl_time; - _swirl_uv -= _swirl_pivot; - _swirl_uv *= mat2(vec2(cos(_swirl_rotation_index), - sin(_swirl_rotation_index)), - vec2(sin(_swirl_rotation_index), cos(_swirl_rotation_index))); - _swirl_uv += _swirl_pivot; - return _swirl_uv; -} \ No newline at end of file diff --git a/shaderV/tools/uv/animated/tilingNoffsetAnimated.gd b/shaderV/tools/uv/animated/tilingNoffsetAnimated.gd deleted file mode 100644 index 29d59c2..0000000 --- a/shaderV/tools/uv/animated/tilingNoffsetAnimated.gd +++ /dev/null @@ -1,65 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVtilingNoffsetAnimated - -func _init(): - set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0)) - set_input_port_default_value(2, 0.0) - -func _get_name() -> String: - return "TilingAndOffsetUVAnimated" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Animated UV tiling with given [offset] speed" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 3 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "offset" - 2: - return "time" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 2: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_2D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/tilingNoffsetAnimated.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _tilingNoffsetAnimatedFunc(%s.xy, %s, %s.xy);" % [ - output_vars[0], uv, input_vars[2], input_vars[1]] diff --git a/shaderV/tools/uv/animated/tilingNoffsetAnimated.gdshaderinc b/shaderV/tools/uv/animated/tilingNoffsetAnimated.gdshaderinc deleted file mode 100644 index 4acf10b..0000000 --- a/shaderV/tools/uv/animated/tilingNoffsetAnimated.gdshaderinc +++ /dev/null @@ -1,4 +0,0 @@ -vec2 _tilingNoffsetAnimatedFunc(vec2 _tilingNoffset_uv, float _tilingNoffset_time, vec2 _tilingNoffset_offset_vect){ - return vec2(mod((_tilingNoffset_uv.x + _tilingNoffset_offset_vect.x * _tilingNoffset_time), 1.0), - mod((_tilingNoffset_uv.y + _tilingNoffset_offset_vect.y * _tilingNoffset_time), 1.0)); -} \ No newline at end of file diff --git a/shaderV/tools/uv/distortionUV.gd b/shaderV/tools/uv/distortionUV.gd deleted file mode 100644 index 16b5be6..0000000 --- a/shaderV/tools/uv/distortionUV.gd +++ /dev/null @@ -1,75 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVdistortion - -func _init(): - set_input_port_default_value(1, 0.0) - set_input_port_default_value(2, 0.0) - set_input_port_default_value(3, 0.0) - set_input_port_default_value(4, 0.0) - -func _get_name() -> String: - return "DistortionUV" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Wave-like UV distortion" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 5 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "waveX" - 2: - return "waveY" - 3: - return "distortX" - 4: - return "distortY" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - 2: - return VisualShaderNode.PORT_TYPE_SCALAR - 3: - return VisualShaderNode.PORT_TYPE_SCALAR - 4: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/distortionUV.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _distortionUV(%s.xy, vec2(%s, %s), vec2(%s, %s));" % [ - output_vars[0], uv, input_vars[3], input_vars[4], input_vars[1], input_vars[2]] diff --git a/shaderV/tools/uv/distortionUV.gdshaderinc b/shaderV/tools/uv/distortionUV.gdshaderinc deleted file mode 100644 index 1a1d426..0000000 --- a/shaderV/tools/uv/distortionUV.gdshaderinc +++ /dev/null @@ -1,5 +0,0 @@ -vec2 _distortionUV(vec2 _distortion_uv, vec2 _distortion_vect, vec2 _distortion_wave_vect) { - _distortion_uv.x += sin(_distortion_uv.y * _distortion_wave_vect.x) * _distortion_vect.x; - _distortion_uv.y += sin(_distortion_uv.x * _distortion_wave_vect.y) * _distortion_vect.y; - return _distortion_uv; -} \ No newline at end of file diff --git a/shaderV/tools/uv/flipUV.gd b/shaderV/tools/uv/flipUV.gd deleted file mode 100644 index 1b2bfab..0000000 --- a/shaderV/tools/uv/flipUV.gd +++ /dev/null @@ -1,65 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVflip - -func _init(): - set_input_port_default_value(1, false) - set_input_port_default_value(2, false) - -func _get_name() -> String: - return "FlipUV" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Flip UV horizontal or vertical" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 3 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "vert" - 2: - return "hor" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_BOOLEAN - 2: - return VisualShaderNode.PORT_TYPE_BOOLEAN - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/flipUV.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _flipUV(%s.xy, vec2(float(%s), float(%s)));" % [ - output_vars[0], uv, input_vars[1], input_vars[2]] diff --git a/shaderV/tools/uv/flipUV.gdshaderinc b/shaderV/tools/uv/flipUV.gdshaderinc deleted file mode 100644 index f6d4293..0000000 --- a/shaderV/tools/uv/flipUV.gdshaderinc +++ /dev/null @@ -1,5 +0,0 @@ -vec2 _flipUV(vec2 _flip_uv, vec2 _flip_vect) { - _flip_uv.x = mix(_flip_uv.x, 1.0 - _flip_uv.x, _flip_vect.x); - _flip_uv.y = mix(_flip_uv.y, 1.0 - _flip_uv.y, _flip_vect.y); - return _flip_uv; -} \ No newline at end of file diff --git a/shaderV/tools/uv/lensDistortion.gd b/shaderV/tools/uv/lensDistortion.gd deleted file mode 100644 index 2334dba..0000000 --- a/shaderV/tools/uv/lensDistortion.gd +++ /dev/null @@ -1,61 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVlensDistortion - -func _init(): - set_input_port_default_value(1, 1.0) - -func _get_name() -> String: - return "LensDistortionUV" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return """Lens distortion effect. -[factor] > 0 - fisheye / barrel; -[factor] < 0 - antifisheye / pincushion""" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 2 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "factor" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/lensDistortion.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _lensDistortionUV(%s.xy, %s);" % [output_vars[0], uv, input_vars[1]] diff --git a/shaderV/tools/uv/lensDistortion.gdshaderinc b/shaderV/tools/uv/lensDistortion.gdshaderinc deleted file mode 100644 index 528b9f6..0000000 --- a/shaderV/tools/uv/lensDistortion.gdshaderinc +++ /dev/null @@ -1,9 +0,0 @@ -vec2 _lensDistortionUV(vec2 _lens_uv, float _lens_factor){ - vec2 _pos_dist_lens = _lens_uv - 0.5; - float _d1st_d1s_1en5 = length(_pos_dist_lens); - if (_lens_factor > 0.0) // fisheye / barrel - _lens_uv = vec2(0.5)+normalize(_pos_dist_lens)*tan(_d1st_d1s_1en5*_lens_factor)*0.70711/tan(0.70711*_lens_factor); - else if (_lens_factor < 0.0) // antifisheye / pincushion - _lens_uv = vec2(0.5)+normalize(_pos_dist_lens)*atan(_d1st_d1s_1en5*-_lens_factor*10.0)*0.5/atan(-_lens_factor*0.5*10.0); - return _lens_uv; -} \ No newline at end of file diff --git a/shaderV/tools/uv/pixelate.gd b/shaderV/tools/uv/pixelate.gd deleted file mode 100644 index f62a236..0000000 --- a/shaderV/tools/uv/pixelate.gd +++ /dev/null @@ -1,60 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVpixelate - -func _init(): - set_input_port_default_value(1, Vector3(64, 64, 0)) - -func _get_name() -> String: - return "PixelateUV" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return """Pixelate UV by size factor -Note: may produce artifacts if applied to texture with mipmaps enabled""" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 2 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "size" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/pixelate.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _pixelateUV(%s.xy, %s.xy);" % [output_vars[0], uv, input_vars[1]] diff --git a/shaderV/tools/uv/pixelate.gdshaderinc b/shaderV/tools/uv/pixelate.gdshaderinc deleted file mode 100644 index 7983102..0000000 --- a/shaderV/tools/uv/pixelate.gdshaderinc +++ /dev/null @@ -1,3 +0,0 @@ -vec2 _pixelateUV(vec2 _pixelate_uv, vec2 _effect_factor_pixelate) { - return round(_pixelate_uv * _effect_factor_pixelate) / (_effect_factor_pixelate - 1.0); -} \ No newline at end of file diff --git a/shaderV/tools/uv/rotate.gd b/shaderV/tools/uv/rotate.gd deleted file mode 100644 index f4748ef..0000000 --- a/shaderV/tools/uv/rotate.gd +++ /dev/null @@ -1,64 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVrotate - -func _init(): - set_input_port_default_value(1, 0.0) - set_input_port_default_value(2, Vector3(0.5, 0.5, 0)) - -func _get_name() -> String: - return "RotateUV" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Rotate UV by angle in radians relative to pivot vector" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 3 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "angle" - 2: - return "pivot" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - 2: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/rotate.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return output_vars[0] + " = _rotateUV(%s, %s.xy, %s);" % [uv, input_vars[2], input_vars[1]] diff --git a/shaderV/tools/uv/rotate.gdshaderinc b/shaderV/tools/uv/rotate.gdshaderinc deleted file mode 100644 index a3979c8..0000000 --- a/shaderV/tools/uv/rotate.gdshaderinc +++ /dev/null @@ -1,9 +0,0 @@ -vec3 _rotateUV(vec3 _rotate_uv, vec2 _rotate_pivot_vect, float _rotate_radians){ - //_r0tation_r0tate = radians(_r0tationDeg_r0tate); - vec2 _rotation_angle = vec2(cos(_rotate_radians), sin(_rotate_radians)); - _rotate_uv.xy -= _rotate_pivot_vect; - _rotate_uv.xy = vec2((_rotate_uv.x*_rotation_angle.x-_rotate_uv.y*_rotation_angle.y), - (_rotate_uv.x*_rotation_angle.y+_rotate_uv.y*_rotation_angle.x)); - _rotate_uv.xy += _rotate_pivot_vect; - return _rotate_uv; -} \ No newline at end of file diff --git a/shaderV/tools/uv/scaleUV.gd b/shaderV/tools/uv/scaleUV.gd deleted file mode 100644 index c629ce9..0000000 --- a/shaderV/tools/uv/scaleUV.gd +++ /dev/null @@ -1,66 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVscale - -func _init(): - set_input_port_default_value(1, Vector3(1, 1, 0)) - set_input_port_default_value(2, Vector3(0.5, 0.5, 0)) - -func _get_name() -> String: - return "ScaleUV" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Scale UV relative to pivot point" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 3 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "scale" - 2: - return "pivot" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 2: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/scaleUV.gdshaderinc"' - - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _scaleUV(%s.xy, %s.xy, %s.xy);" % [ - output_vars[0], uv, input_vars[1], input_vars[2]] diff --git a/shaderV/tools/uv/scaleUV.gdshaderinc b/shaderV/tools/uv/scaleUV.gdshaderinc deleted file mode 100644 index c1bf07e..0000000 --- a/shaderV/tools/uv/scaleUV.gdshaderinc +++ /dev/null @@ -1,3 +0,0 @@ -vec2 _scaleUV(vec2 _scale_uv, vec2 _scale_vect, vec2 _pivot_vect) { - return (_scale_uv - _pivot_vect) * _scale_vect + _pivot_vect; -} \ No newline at end of file diff --git a/shaderV/tools/uv/sphericalUV.gd b/shaderV/tools/uv/sphericalUV.gd deleted file mode 100644 index ed3bb93..0000000 --- a/shaderV/tools/uv/sphericalUV.gd +++ /dev/null @@ -1,75 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVspherical - -func _init(): - set_input_port_default_value(1, Vector3(1.0, 1.0, 0.0)) - set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0)) - set_input_port_default_value(3, Vector3(0.5, 0.5, 0.0)) - set_input_port_default_value(4, Vector3(0.0, 0.0, 0.0)) - -func _get_name() -> String: - return "SphericalUV" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory() -> String: -# return "" - -func _get_description() -> String: - return "Makes UV look like a sphere. Can be used to make 2d planets" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 5 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "radius" - 2: - return "spin" - 3: - return "position" - 4: - return "local position" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 2: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 3: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 4: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/sphericalUV.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _sphericalUV(%s.xy, %s.xy, %s.xy, %s.xy, %s.xy);" % [ - output_vars[0], uv, input_vars[3], input_vars[1], input_vars[2], input_vars[4]] diff --git a/shaderV/tools/uv/sphericalUV.gdshaderinc b/shaderV/tools/uv/sphericalUV.gdshaderinc deleted file mode 100644 index e520bee..0000000 --- a/shaderV/tools/uv/sphericalUV.gdshaderinc +++ /dev/null @@ -1,7 +0,0 @@ -vec2 _sphericalUV(vec2 _spherical_uv, vec2 _spherical_position_vect, vec2 _spherical_radius_vect, vec2 _spherical_spin_vect, vec2 _spherical_local_position_vect){ - vec2 _temp_p = (_spherical_uv - _spherical_position_vect) * 2.0; - float _temp_rad = length((_temp_p - _spherical_local_position_vect) * _spherical_radius_vect) + 0.0001; - float _temp_f = (1.0 - sqrt(1.0 - _temp_rad)) / _temp_rad; - return mod(vec2((_temp_p.x * 0.5 * _temp_f + _spherical_spin_vect.x) + 0.5, - (_temp_p.y * 0.5 * _temp_f + _spherical_spin_vect.y) + 0.5), vec2(1.0)); -} \ No newline at end of file diff --git a/shaderV/tools/uv/tileUV.gd b/shaderV/tools/uv/tileUV.gd deleted file mode 100644 index a76568d..0000000 --- a/shaderV/tools/uv/tileUV.gd +++ /dev/null @@ -1,74 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVtile - -func _init(): - set_input_port_default_value(1, 2.0) - set_input_port_default_value(2, 2.0) - set_input_port_default_value(3, 0.0) - -func _get_name() -> String: - return "TileUV" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory() -> String: -# return "" - -func _get_description() -> String: - return """Tile UV can be used to get UV position of tile within a tilemap. -[uv] - uv of tileset; -[Vframes] - the number of rows; -[Hframes] - the number of columns; -[frame] - current frame;""" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 4 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "Vframes" - 2: - return "Hframes" - 3: - return "frame" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - 2: - return VisualShaderNode.PORT_TYPE_SCALAR - 3: - return VisualShaderNode.PORT_TYPE_SCALAR - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/tileUV.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _tileMapUV(%s.xy, %s, %s, %s);" % [ - output_vars[0], uv, input_vars[1], input_vars[2], input_vars[3]] diff --git a/shaderV/tools/uv/tileUV.gdshaderinc b/shaderV/tools/uv/tileUV.gdshaderinc deleted file mode 100644 index d6b80df..0000000 --- a/shaderV/tools/uv/tileUV.gdshaderinc +++ /dev/null @@ -1,7 +0,0 @@ -vec2 _tileMapUV(vec2 _tile_uv, float _tile_width, float _tile_height, float _tile_number){ - _tile_number = min(max(floor(_tile_number), 0.0), _tile_width * _tile_height - 1.0); - vec2 tcrcp = vec2(1.0) / vec2(_tile_width, _tile_height); - float ty =floor(_tile_number * tcrcp.x); - float tx = _tile_number - _tile_width * ty; - return (_tile_uv + vec2(tx, ty)) * tcrcp; -} \ No newline at end of file diff --git a/shaderV/tools/uv/tilingNoffset.gd b/shaderV/tools/uv/tilingNoffset.gd deleted file mode 100644 index 662f566..0000000 --- a/shaderV/tools/uv/tilingNoffset.gd +++ /dev/null @@ -1,59 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVtilingNoffset - -func _init(): - set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0)) - -func _get_name() -> String: - return "TilingAndOffsetUV" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Tiles UV with given offset" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 2 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "offset" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/tilingNoffset.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return output_vars[0] + " = vec3(_tiling_and_offset(%s.xy, %s.xy), 0);" % [uv, input_vars[1]] diff --git a/shaderV/tools/uv/tilingNoffset.gdshaderinc b/shaderV/tools/uv/tilingNoffset.gdshaderinc deleted file mode 100644 index d025d1e..0000000 --- a/shaderV/tools/uv/tilingNoffset.gdshaderinc +++ /dev/null @@ -1,4 +0,0 @@ -vec2 _tiling_and_offset(vec2 _tiling_and_offset_uv, vec2 _tiling_and_offset_offset_vect){ - return vec2(mod(_tiling_and_offset_uv.x + _tiling_and_offset_offset_vect.x, 1.0), - mod(_tiling_and_offset_uv.y + _tiling_and_offset_offset_vect.y, 1.0)); -} \ No newline at end of file diff --git a/shaderV/tools/uv/transformUV.gd b/shaderV/tools/uv/transformUV.gd deleted file mode 100644 index a3e971c..0000000 --- a/shaderV/tools/uv/transformUV.gd +++ /dev/null @@ -1,80 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVtransform - -func _init(): - set_input_port_default_value(1, Vector3(0, 0, 0)) - set_input_port_default_value(2, Vector3(1, 1, 0)) - set_input_port_default_value(3, Vector3(0.5, 0.5, 0)) - set_input_port_default_value(4, 0.0) - set_input_port_default_value(5, Vector3(0.5, 0.5, 0)) - -func _get_name() -> String: - return "TransformUV" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Performs offset, scale and rotation of UV with custom pivots. Rotation is set in radians." - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 6 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "offset" - 2: - return "scale" - 3: - return "scalePivot" - 4: - return "rotation" - 5: - return "rotationPivot" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 2: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 3: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 4: - return VisualShaderNode.PORT_TYPE_SCALAR - 5: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/transformUV.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return "%s.xy = _transformUV(%s.xy, %s.xy, %s.xy, %s.xy, %s, %s.xy);" % [ - output_vars[0], uv, input_vars[2], input_vars[3], input_vars[1], input_vars[4], input_vars[5]] diff --git a/shaderV/tools/uv/transformUV.gdshaderinc b/shaderV/tools/uv/transformUV.gdshaderinc deleted file mode 100644 index ab313f4..0000000 --- a/shaderV/tools/uv/transformUV.gdshaderinc +++ /dev/null @@ -1,8 +0,0 @@ -vec2 _transformUV(vec2 _uv_transform, vec2 _scale_uv_, vec2 _pivot_scale_uv_, vec2 _offset_uv_, float _rotate_uv, vec2 _pivot_rotate_uv_){ - _uv_transform -= _offset_uv_; // offset - _uv_transform = (_uv_transform - _pivot_scale_uv_) * _scale_uv_ + _pivot_scale_uv_; // zoom - vec2 _rot_uv_angl = vec2(cos(_rotate_uv), sin(_rotate_uv)); - mat2 _rot_matrix = mat2(vec2(_rot_uv_angl.x, - _rot_uv_angl.y), vec2(_rot_uv_angl.y, _rot_uv_angl.x)); - _uv_transform = (_uv_transform - _pivot_rotate_uv_) * _rot_matrix + _pivot_rotate_uv_; // rotate - return _uv_transform; -} \ No newline at end of file diff --git a/shaderV/tools/uv/twirl.gd b/shaderV/tools/uv/twirl.gd deleted file mode 100644 index 01a6216..0000000 --- a/shaderV/tools/uv/twirl.gd +++ /dev/null @@ -1,64 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderNodeUVtwirl - -func _init(): - set_input_port_default_value(1, 1.0) - set_input_port_default_value(2, Vector3(0.5, 0.5, 0)) - -func _get_name() -> String: - return "TwirlUV" - -func _get_category() -> String: - return "UV" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Twirl UV by value relative to pivot point" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 3 - -func _get_input_port_name(port: int): - match port: - 0: - return "uv" - 1: - return "value" - 2: - return "pivot" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - 2: - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port: int) -> String: - return "uv" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/twirl.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - var uv = "UV" - - if input_vars[0]: - uv = input_vars[0] - - return output_vars[0] + " = _twirlUVFunc(%s.xy, %s.xy, %s);" % [uv, input_vars[2], input_vars[1]] diff --git a/shaderV/tools/uv/twirl.gdshaderinc b/shaderV/tools/uv/twirl.gdshaderinc deleted file mode 100644 index 84f5dc9..0000000 --- a/shaderV/tools/uv/twirl.gdshaderinc +++ /dev/null @@ -1,7 +0,0 @@ -vec3 _twirlUVFunc(vec2 _uv_twirlUVFunc, vec2 _pivot_twirlUVFunc, float _amount_twirlUVFunc){ - _uv_twirlUVFunc -= _pivot_twirlUVFunc; - float _angle_twirlUVFunc = atan(_uv_twirlUVFunc.y, _uv_twirlUVFunc.x); - float _radiusTemp_twirlUVFunc = length(_uv_twirlUVFunc); - _angle_twirlUVFunc += _radiusTemp_twirlUVFunc * _amount_twirlUVFunc; - return vec3(_radiusTemp_twirlUVFunc * vec2(cos(_angle_twirlUVFunc), sin(_angle_twirlUVFunc)) + 0.5, 0.0); -} \ No newline at end of file diff --git a/shaderV/tools/vec2Compose.gd b/shaderV/tools/vec2Compose.gd deleted file mode 100644 index 086822b..0000000 --- a/shaderV/tools/vec2Compose.gd +++ /dev/null @@ -1,60 +0,0 @@ -@tool -extends VisualShaderNodeCustom -class_name VisualShaderToolsvec2Compose - -func _init(): - set_input_port_default_value(0, 1.0) - set_input_port_default_value(1, 0.0) - -func _get_name() -> String: - return "vec2Compose" - -func _get_category() -> String: - return "Tools" - -#func _get_subcategory(): -# return "" - -func _get_description() -> String: - return "Makes 2d vector from length and angle (in radians)" - -func _get_return_icon_type(): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_input_port_count() -> int: - return 2 - -func _get_input_port_name(port: int): - match port: - 0: - return "length" - 1: - return "radians" - -func _get_input_port_type(port: int): - match port: - 0: - return VisualShaderNode.PORT_TYPE_SCALAR - 1: - return VisualShaderNode.PORT_TYPE_SCALAR - - -func _get_output_port_count() -> int: - return 1 - -func _get_output_port_name(port ) -> String: - return "vec2" - -func _get_output_port_type(port): - return VisualShaderNode.PORT_TYPE_VECTOR_3D - -func _get_global_code(mode): - var path = self.get_script().get_path().get_base_dir() - return '#include "' + path + '/vec2Compose.gdshaderinc"' - -func _get_code(input_vars, output_vars, mode, type): - return "%s.xy = _vec2ComposeFunc(%s, %s);" % [output_vars[0], input_vars[0], input_vars[1]] - - - - diff --git a/shaderV/tools/vec2Compose.gdshaderinc b/shaderV/tools/vec2Compose.gdshaderinc deleted file mode 100644 index 1255cfb..0000000 --- a/shaderV/tools/vec2Compose.gdshaderinc +++ /dev/null @@ -1,3 +0,0 @@ -vec2 _vec2ComposeFunc(float _vec2_length, float _vec2_angle_radians){ - return vec2(cos(_vec2_angle_radians), sin(_vec2_angle_radians)) * _vec2_length; -} \ No newline at end of file diff --git a/shaders/bg.tres b/shaders/bg.tres index f7779c6..c1c0ad9 100644 --- a/shaders/bg.tres +++ b/shaders/bg.tres @@ -1,7 +1,7 @@ [gd_resource type="VisualShader" load_steps=15 format=3 uid="uid://6tmohkhqfvur"] -[ext_resource type="Script" path="res://shaderV/rgba/noise/worley2x2x2.gd" id="1_cyqt6"] -[ext_resource type="Script" path="res://shaderV/rgba/noise/perlin3d.gd" id="2_e5q25"] +[ext_resource type="Script" path="res://shaderV/worley2x2x2.gd" id="1_cyqt6"] +[ext_resource type="Script" path="res://shaderV/perlin3d.gd" id="2_e5q25"] [sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_f3ari"] default_input_values = [0, 0.0, 1, 0.05] diff --git a/shaders/blob2.tres b/shaders/blob2.tres index 763d723..e0afa4a 100644 --- a/shaders/blob2.tres +++ b/shaders/blob2.tres @@ -1,6 +1,6 @@ [gd_resource type="VisualShader" load_steps=26 format=3 uid="uid://whygv3qsb6m6"] -[ext_resource type="Script" path="res://shaderV/rgba/noise/worley2x2x2.gd" id="1_mjbnk"] +[ext_resource type="Script" path="res://shaderV/worley2x2x2.gd" id="1_mjbnk"] [sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_ulwur"] input_name = "time" diff --git a/shaders/circle.tres b/shaders/circle.tres index b95ab88..03ad1c6 100644 --- a/shaders/circle.tres +++ b/shaders/circle.tres @@ -1,6 +1,4 @@ -[gd_resource type="VisualShader" load_steps=29 format=3 uid="uid://b31386icwo8hn"] - -[ext_resource type="Script" path="res://shaderV/tools/uv/rotate.gd" id="1_cpwkh"] +[gd_resource type="VisualShader" load_steps=27 format=3 uid="uid://b31386icwo8hn"] [sub_resource type="VisualShaderNodeStep" id="VisualShaderNodeStep_7ers5"] output_port_for_preview = 0 @@ -48,11 +46,6 @@ constant = 3.14159 default_input_values = [0, 0.0, 1, -1.0] operator = 2 -[sub_resource type="VisualShaderNodeCustom" id="VisualShaderNodeCustom_xv7kr"] -default_input_values = [1, -45.0, 2, Vector3(0.5, 0.5, 0)] -initialized = true -script = ExtResource("1_cpwkh") - [sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_aukd1"] default_input_values = [0, 0.0, 1, 2.0] operator = 3 @@ -118,8 +111,6 @@ uniform float thickness = 0.10000000149012; uniform float width = 40; -// RotateUV -#include \"res://shaderV/tools/uv/rotate.gdshaderinc\" void fragment() { // ColorParameter:22 @@ -182,35 +173,10 @@ void fragment() { float n_out19p0 = min(n_out18p0, n_out40p0.x); -// FloatParameter:25 - float n_out25p0 = width; - - -// FloatOp:33 - float n_in33p1 = 2.00000; - float n_out33p0 = n_out25p0 / n_in33p1; - - -// FloatOp:35 - float n_in35p1 = -90.00000; - float n_out35p0 = n_out33p0 + n_in35p1; - - -// FloatFunc:34 - float n_out34p0 = radians(n_out35p0); - - - vec3 n_out32p0; -// RotateUV:32 - vec3 n_in32p2 = vec3(0.50000, 0.50000, 0.00000); - { - n_out32p0 = _rotateUV(vec3(n_out2p0, 0.0), n_in32p2.xy, n_out34p0); - } - - // VectorOp:8 + vec2 n_in8p0 = vec2(0.00000, 0.00000); vec2 n_in8p1 = vec2(0.50000, 0.50000); - vec2 n_out8p0 = vec2(n_out32p0.xy) - n_in8p1; + vec2 n_out8p0 = n_in8p0 - n_in8p1; // VectorDecompose:13 @@ -222,6 +188,10 @@ void fragment() { float n_out12p0 = atan(n_out13p1, n_out13p0); +// FloatParameter:25 + float n_out25p0 = width; + + // FloatConstant:27 float n_out27p0 = 3.141590; @@ -298,8 +268,6 @@ nodes/fragment/27/node = SubResource("VisualShaderNodeFloatConstant_8t0bq") nodes/fragment/27/position = Vector2(-360, 1300) nodes/fragment/28/node = SubResource("VisualShaderNodeFloatOp_j6r0w") nodes/fragment/28/position = Vector2(-40, 1140) -nodes/fragment/32/node = SubResource("VisualShaderNodeCustom_xv7kr") -nodes/fragment/32/position = Vector2(-300, 640) nodes/fragment/33/node = SubResource("VisualShaderNodeFloatOp_aukd1") nodes/fragment/33/position = Vector2(-940, 820) nodes/fragment/34/node = SubResource("VisualShaderNodeFloatFunc_hwpmu") @@ -324,4 +292,4 @@ nodes/fragment/45/node = SubResource("VisualShaderNodeFloatConstant_supmd") nodes/fragment/45/position = Vector2(-820, -60) nodes/fragment/46/node = SubResource("VisualShaderNodeFloatOp_f5gcj") nodes/fragment/46/position = Vector2(1820, 440) -nodes/fragment/connections = PackedInt32Array(2, 0, 4, 0, 8, 0, 13, 0, 13, 1, 12, 0, 13, 0, 12, 1, 18, 0, 19, 0, 19, 0, 16, 0, 16, 0, 0, 1, 27, 0, 28, 0, 12, 0, 10, 0, 2, 0, 32, 0, 32, 0, 8, 0, 25, 0, 33, 0, 34, 0, 32, 1, 33, 0, 35, 0, 35, 0, 34, 0, 25, 0, 37, 0, 28, 0, 37, 3, 27, 0, 37, 4, 37, 0, 10, 1, 23, 0, 39, 0, 4, 0, 40, 0, 40, 0, 19, 1, 4, 0, 41, 0, 41, 0, 40, 1, 4, 0, 43, 0, 43, 0, 42, 1, 4, 0, 42, 0, 39, 0, 42, 2, 42, 0, 18, 0, 44, 0, 16, 1, 45, 0, 43, 1, 45, 0, 41, 1, 10, 0, 44, 2, 46, 0, 0, 1, 16, 0, 46, 1, 22, 0, 0, 0, 22, 4, 46, 0) +nodes/fragment/connections = PackedInt32Array(2, 0, 4, 0, 8, 0, 13, 0, 13, 1, 12, 0, 13, 0, 12, 1, 18, 0, 19, 0, 19, 0, 16, 0, 16, 0, 0, 1, 27, 0, 28, 0, 12, 0, 10, 0, 25, 0, 33, 0, 33, 0, 35, 0, 35, 0, 34, 0, 25, 0, 37, 0, 28, 0, 37, 3, 27, 0, 37, 4, 37, 0, 10, 1, 23, 0, 39, 0, 4, 0, 40, 0, 40, 0, 19, 1, 4, 0, 41, 0, 41, 0, 40, 1, 4, 0, 43, 0, 43, 0, 42, 1, 4, 0, 42, 0, 39, 0, 42, 2, 42, 0, 18, 0, 44, 0, 16, 1, 45, 0, 43, 1, 45, 0, 41, 1, 10, 0, 44, 2, 46, 0, 0, 1, 16, 0, 46, 1, 22, 0, 0, 0, 22, 4, 46, 0)