From c780fa47c5e2fe49805484fb43afc61d5302ccdc Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 28 Oct 2022 20:50:20 +0200 Subject: [PATCH] Add UV Flipbook node, more SD-Shapes and overworked examples --- README.md | 8 +- .../AddonAssets/DinoSprites - vita.png | Bin 0 -> 1957 bytes .../AddonAssets/DinoSprites - vita.png.import | 35 + .../AddonAssets/Kenney Future Narrow.ttf | Bin 0 -> 34856 bytes .../VisualShaderExtras/AddonAssets/README.md | 4 + .../AddonAssets/examples2D.tscn | 2226 +++++++++++++++++ .../AddonAssets/examples3D.tscn | 783 ++++++ .../BlendModes/Exclusion.gd | 2 +- .../VisualShaderExtras/BlendModes/HardMix.gd | 2 +- .../BlendModes/LinearBurn.gd | 2 +- .../BlendModes/Luminosity.gd | 2 +- .../VisualShaderExtras/BlendModes/PinLight.gd | 4 +- .../BlendModes/VividLight.gd | 6 +- .../Shapes/Parallelogram.gd | 104 + addons/VisualShaderExtras/Shapes/Rhombus.gd | 90 + .../VisualShaderExtras/Shapes/RotatedBox.gd | 101 + addons/VisualShaderExtras/Shapes/Trapezoid.gd | 102 + addons/VisualShaderExtras/Shapes/Triangle.gd | 92 + addons/VisualShaderExtras/UV/UVFlipbook.gd | 120 + addons/VisualShaderExtras/UV/UVPolarCoord.gd | 4 +- default_env.tres | 7 + examples2D.tscn | 552 ---- examples3D.tscn | 292 --- project.godot | 36 + readme-enable.png.import | 35 + readme-font.png.import | 35 + 26 files changed, 3788 insertions(+), 856 deletions(-) create mode 100644 addons/VisualShaderExtras/AddonAssets/DinoSprites - vita.png create mode 100644 addons/VisualShaderExtras/AddonAssets/DinoSprites - vita.png.import create mode 100644 addons/VisualShaderExtras/AddonAssets/Kenney Future Narrow.ttf create mode 100644 addons/VisualShaderExtras/AddonAssets/README.md create mode 100644 addons/VisualShaderExtras/AddonAssets/examples2D.tscn create mode 100644 addons/VisualShaderExtras/AddonAssets/examples3D.tscn create mode 100644 addons/VisualShaderExtras/Shapes/Parallelogram.gd create mode 100644 addons/VisualShaderExtras/Shapes/Rhombus.gd create mode 100644 addons/VisualShaderExtras/Shapes/RotatedBox.gd create mode 100644 addons/VisualShaderExtras/Shapes/Trapezoid.gd create mode 100644 addons/VisualShaderExtras/Shapes/Triangle.gd create mode 100644 addons/VisualShaderExtras/UV/UVFlipbook.gd create mode 100644 default_env.tres delete mode 100644 examples2D.tscn delete mode 100644 examples3D.tscn create mode 100644 readme-enable.png.import create mode 100644 readme-font.png.import diff --git a/README.md b/README.md index 147de9a..2c43ba2 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,16 @@ A Visual Shader Node Add-On for the Godot Engine - Box - Circle - Rounded Box + - Rotated Box + - Trapezoid + - Triangle + - Rhombus + - Parallelogram - more coming soon... - UV - - UV PolarCoordinates (CanvasItem and Spatial ShaderMode supported) + - UV PolarCoord (CanvasItem and Spatial ShaderMode supported) - UV Twirl + - UV Flipbook - Utility - Random Range - Remap diff --git a/addons/VisualShaderExtras/AddonAssets/DinoSprites - vita.png b/addons/VisualShaderExtras/AddonAssets/DinoSprites - vita.png new file mode 100644 index 0000000000000000000000000000000000000000..1ee674433bc5d517406737ac12f224a51edcc023 GIT binary patch literal 1957 zcmeAS@N?(olHy`uVBq!ia0y~yU~&MmB{-OYq$=B{?FUpN8K(UAowR3xv+EvT|0DK>{}~u&X-w!?;5>hi@3#L8|JN}*U2XgK zc*2eC{r|78`2Qa$KMF=eVCaQF-kUSM3=E76B|(0{48U|ef&qj2ROyYtav{Xi#W5tK z@$Ia$lNKBBw5+^Tx=L-j&insMbe>&*@UKU-{nV0ER&N|jqJmaC^K8C*VUeqA$^5(p zN6X!f1G-mbuxar|KUVuQ{aBJh_oJ2qPR9d0_MbWaytO%Cr&d=lUmU^6|FFG|H)~7E zs{JCH8xQSJnc%)-X8WhOc_Q`3{Of9u^-n)!&-%CL=Yi5=-wQ=n{NXi}JW;oaNtAp0 zhk$#hCqKx4wlGt@M!qbkabL%Mx9%I9_nR9JPPMr^Eq;nH zldQ}P(Y!rQKY8jc|Ha8g|J9dstNHt4PhDGl-|7Hyaho^%y{>HvHM-}&sokoZ|Nqzu zL5<^&pZ*u%UwHSggIt_)+N)Qr{;zxQ@7mk3{`t-OF8f^-9)0{&-@|VHb6(vZzC%a- z-EV(U&Z{x?-yVN~DNv3@Rqn*&B(pt^`{o>9vtxd3%$0>}>hI24Z8v|B z{E_|-&wq;TeI{%3_^rmF{PG0_n}z=HdrlVQtC-e!`Ok^PVtYQRw97tvUU%rgrukEj z%k9#MJMmKOLx#et?r!-*3vZjmNn{^m4}Vc(wZZIKkV2Dtd&bGh#w{m=&(HB^=R38M zb-m5W1IyUwRj4(4J$JJIWFU7-Bvt>H=Hc|di@V-!OZYllYu?QZ5!^999~y>=AA4l} zSa4Ujy+TC>gAv!K7meaiOJa{7xSZVcvaOFf{tIX7PbW9?*5}3n>(>1dp4q~`Mt#l& zbs^0y*FL*kJsKIRqAg&uYW7v;&*mpBKm0MMvHajVKVX{vhCCttJ;kx&`mgviY-L4^ z=Y8!dj-Au`T_7oT=bp`xpQaW+Si90m>xJ;?ORU#?4;{4sx$FIf&r3BHWc^p(=o)Im hymdua+5)lAkMei7A26$F^N9tOke;r7F6*2UngAF9-RA%R literal 0 HcmV?d00001 diff --git a/addons/VisualShaderExtras/AddonAssets/DinoSprites - vita.png.import b/addons/VisualShaderExtras/AddonAssets/DinoSprites - vita.png.import new file mode 100644 index 0000000..f011f16 --- /dev/null +++ b/addons/VisualShaderExtras/AddonAssets/DinoSprites - vita.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/DinoSprites - vita.png-04dd81e151114c837b853ad1ec8587bd.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/VisualShaderExtras/AddonAssets/DinoSprites - vita.png" +dest_files=[ "res://.import/DinoSprites - vita.png-04dd81e151114c837b853ad1ec8587bd.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=1 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/addons/VisualShaderExtras/AddonAssets/Kenney Future Narrow.ttf b/addons/VisualShaderExtras/AddonAssets/Kenney Future Narrow.ttf new file mode 100644 index 0000000000000000000000000000000000000000..42f2c33a2ad8de72a1a2a706d308824746f5b97a GIT binary patch literal 34856 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 literal 0 HcmV?d00001 diff --git a/addons/VisualShaderExtras/AddonAssets/README.md b/addons/VisualShaderExtras/AddonAssets/README.md new file mode 100644 index 0000000..46c4ee3 --- /dev/null +++ b/addons/VisualShaderExtras/AddonAssets/README.md @@ -0,0 +1,4 @@ +# Credits + +* Dino Sprites from [here](https://arks.itch.io/dino-characters) by [@ScissorMarks](https://twitter.com/ScissorMarks) +* Font by [Kenney](https://www.kenney.nl/assets/kenney-fonts) \ No newline at end of file diff --git a/addons/VisualShaderExtras/AddonAssets/examples2D.tscn b/addons/VisualShaderExtras/AddonAssets/examples2D.tscn new file mode 100644 index 0000000..74abd76 --- /dev/null +++ b/addons/VisualShaderExtras/AddonAssets/examples2D.tscn @@ -0,0 +1,2226 @@ +[gd_scene load_steps=146 format=2] + +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Rhombus.gd" type="Script" id=1] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/RotatedBox.gd" type="Script" id=2] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Triangle.gd" type="Script" id=3] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Trapezoid.gd" type="Script" id=4] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/RoundedBox.gd" type="Script" id=5] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Circle.gd" type="Script" id=6] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Parallelogram.gd" type="Script" id=7] +[ext_resource path="res://addons/VisualShaderExtras/AddonAssets/Kenney Future Narrow.ttf" type="DynamicFontData" id=8] +[ext_resource path="res://icon.png" type="Texture" id=9] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Box.gd" type="Script" id=10] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/GammaIllumination.gd" type="Script" id=11] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/GammaLight.gd" type="Script" id=12] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/LinearLight.gd" type="Script" id=13] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/HardMix.gd" type="Script" id=14] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/GammaDark.gd" type="Script" id=15] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/LighterColor.gd" type="Script" id=16] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/LinearBurn.gd" type="Script" id=17] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/Luminosity.gd" type="Script" id=18] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/PinLight.gd" type="Script" id=19] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/VividLight.gd" type="Script" id=20] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/DarkerColor.gd" type="Script" id=21] +[ext_resource path="res://addons/VisualShaderExtras/BlendModes/Exclusion.gd" type="Script" id=22] + +[sub_resource type="DynamicFont" id=27] +size = 32 +font_data = ExtResource( 8 ) + +[sub_resource type="DynamicFont" id=28] +size = 25 +font_data = ExtResource( 8 ) + +[sub_resource type="VisualShaderNodeCustom" id=63] +initialized = true +script = ExtResource( 11 ) + +[sub_resource type="OpenSimplexNoise" id=64] + +[sub_resource type="NoiseTexture" id=65] +seamless = true +noise = SubResource( 64 ) + +[sub_resource type="VisualShaderNodeTexture" id=66] +texture = SubResource( 65 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeTexture" id=67] +texture = ExtResource( 9 ) +texture_type = 1 + +[sub_resource type="VisualShader" id=68] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_3 : hint_albedo; +uniform sampler2D tex_frg_4 : hint_albedo; + + +// BlendGammaIllumination + + vec3 blend_gamma_illumination(vec3 __top_col, vec3 __bot_col) + { + return (1.0 - pow(__bot_col, (1.0 / __top_col))); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// Texture:4 + vec4 tex_frg_4_read = texture(tex_frg_4, UV.xy); + vec3 n_out4p0 = tex_frg_4_read.rgb; + float n_out4p1 = tex_frg_4_read.a; + +// BlendGammaIllumination:2 + vec3 n_out2p0; + { + n_out2p0.rgb = blend_gamma_illumination(n_out3p0.rgb, n_out4p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out2p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -263.315, 8.46887 ) +mode = 1 +flags/light_only = false +nodes/fragment/2/node = SubResource( 63 ) +nodes/fragment/2/position = Vector2( 40, 200 ) +nodes/fragment/3/node = SubResource( 66 ) +nodes/fragment/3/position = Vector2( -220, 100 ) +nodes/fragment/4/node = SubResource( 67 ) +nodes/fragment/4/position = Vector2( -240, 320 ) +nodes/fragment/connections = PoolIntArray( 3, 0, 2, 0, 4, 0, 2, 1, 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=69] +shader = SubResource( 68 ) + +[sub_resource type="DynamicFont" id=70] +font_data = ExtResource( 8 ) + +[sub_resource type="OpenSimplexNoise" id=71] + +[sub_resource type="NoiseTexture" id=72] +seamless = true +noise = SubResource( 71 ) + +[sub_resource type="VisualShaderNodeTexture" id=73] +texture = SubResource( 72 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeTexture" id=74] +texture = ExtResource( 9 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeCustom" id=75] +initialized = true +script = ExtResource( 12 ) + +[sub_resource type="VisualShader" id=76] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_2 : hint_albedo; +uniform sampler2D tex_frg_3 : hint_albedo; + + +// BlendGammaLight + + vec3 blend_gamma_light(vec3 __top_col, vec3 __bot_col) + { + return pow(__bot_col, __top_col); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:2 + vec4 tex_frg_2_read = texture(tex_frg_2, UV.xy); + vec3 n_out2p0 = tex_frg_2_read.rgb; + float n_out2p1 = tex_frg_2_read.a; + +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// BlendGammaLight:4 + vec3 n_out4p0; + { + n_out4p0.rgb = blend_gamma_light(n_out2p0.rgb, n_out3p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -263.315, 8.46887 ) +mode = 1 +flags/light_only = false +nodes/fragment/2/node = SubResource( 73 ) +nodes/fragment/2/position = Vector2( -120, 80 ) +nodes/fragment/3/node = SubResource( 74 ) +nodes/fragment/3/position = Vector2( -120, 300 ) +nodes/fragment/4/node = SubResource( 75 ) +nodes/fragment/4/position = Vector2( 125.685, 180.469 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 4, 0, 3, 0, 4, 1, 4, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=77] +shader = SubResource( 76 ) + +[sub_resource type="DynamicFont" id=78] +font_data = ExtResource( 8 ) + +[sub_resource type="VisualShaderNodeCustom" id=102] +initialized = true +script = ExtResource( 16 ) + +[sub_resource type="OpenSimplexNoise" id=103] + +[sub_resource type="NoiseTexture" id=104] +seamless = true +noise = SubResource( 103 ) + +[sub_resource type="VisualShaderNodeTexture" id=105] +texture = SubResource( 104 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeTexture" id=106] +texture = ExtResource( 9 ) +texture_type = 1 + +[sub_resource type="VisualShader" id=107] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_3 : hint_albedo; +uniform sampler2D tex_frg_4 : hint_albedo; + + +// BlendLighterColor + + vec3 lighterColor( vec3 s, vec3 d ) + { + return (s.x + s.y + s.z > d.x + d.y + d.z) ? s : d; + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// Texture:4 + vec4 tex_frg_4_read = texture(tex_frg_4, UV.xy); + vec3 n_out4p0 = tex_frg_4_read.rgb; + float n_out4p1 = tex_frg_4_read.a; + +// BlendLighterColor:2 + vec3 n_out2p0; + { + n_out2p0.rgb = lighterColor(n_out3p0.rgb, n_out4p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out2p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -462.315, 50.4689 ) +mode = 1 +flags/light_only = false +nodes/fragment/2/node = SubResource( 102 ) +nodes/fragment/2/position = Vector2( 105.685, 156.469 ) +nodes/fragment/3/node = SubResource( 105 ) +nodes/fragment/3/position = Vector2( -160, 20 ) +nodes/fragment/4/node = SubResource( 106 ) +nodes/fragment/4/position = Vector2( -160, 240 ) +nodes/fragment/connections = PoolIntArray( 4, 0, 2, 1, 3, 0, 2, 0, 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=108] +shader = SubResource( 107 ) + +[sub_resource type="DynamicFont" id=86] +font_data = ExtResource( 8 ) + +[sub_resource type="VisualShaderNodeCustom" id=79] +initialized = true +script = ExtResource( 13 ) + +[sub_resource type="OpenSimplexNoise" id=80] + +[sub_resource type="NoiseTexture" id=81] +seamless = true +noise = SubResource( 80 ) + +[sub_resource type="VisualShaderNodeTexture" id=82] +texture = SubResource( 81 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeTexture" id=83] +texture = ExtResource( 9 ) +texture_type = 1 + +[sub_resource type="VisualShader" id=84] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_3 : hint_albedo; +uniform sampler2D tex_frg_4 : hint_albedo; + + +// BlendLinearLight + + vec3 blend_linear_light(vec3 __top_col, vec3 __bot_col) + { + return (__bot_col + 2.0 * __top_col) - 1.0; + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// Texture:4 + vec4 tex_frg_4_read = texture(tex_frg_4, UV.xy); + vec3 n_out4p0 = tex_frg_4_read.rgb; + float n_out4p1 = tex_frg_4_read.a; + +// BlendLinearLight:2 + vec3 n_out2p0; + { + n_out2p0.rgb = blend_linear_light(n_out3p0.rgb, n_out4p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out2p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -346.315, -30.5311 ) +mode = 1 +flags/light_only = false +nodes/fragment/2/node = SubResource( 79 ) +nodes/fragment/2/position = Vector2( 100, 160 ) +nodes/fragment/3/node = SubResource( 82 ) +nodes/fragment/3/position = Vector2( -241.315, 27.4689 ) +nodes/fragment/4/node = SubResource( 83 ) +nodes/fragment/4/position = Vector2( -240, 260 ) +nodes/fragment/connections = PoolIntArray( 4, 0, 2, 1, 3, 0, 2, 0, 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=85] +shader = SubResource( 84 ) + +[sub_resource type="OpenSimplexNoise" id=116] + +[sub_resource type="NoiseTexture" id=117] +seamless = true +noise = SubResource( 116 ) + +[sub_resource type="VisualShaderNodeTexture" id=118] +texture = SubResource( 117 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeTexture" id=121] +texture = ExtResource( 9 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeCustom" id=122] +initialized = true +script = ExtResource( 18 ) + +[sub_resource type="VisualShader" id=119] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_2 : hint_albedo; +uniform sampler2D tex_frg_3 : hint_albedo; + + +// BlendLuminosity + + vec3 luminosity( vec3 s, vec3 d ) + { + float dLum = dot(d, vec3(0.3, 0.59, 0.11)); + float sLum = dot(s, vec3(0.3, 0.59, 0.11)); + float lum = sLum - dLum; + vec3 c = d + lum; + float minC = min(min(c.x, c.y), c.z); + float maxC = max(max(c.x, c.y), c.z); + if(minC < 0.0) return sLum + ((c - sLum) * sLum) / (sLum - minC); + else if(maxC > 1.0) return sLum + ((c - sLum) * (1.0 - sLum)) / (maxC - sLum); + else return c; + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:2 + vec4 tex_frg_2_read = texture(tex_frg_2, UV.xy); + vec3 n_out2p0 = tex_frg_2_read.rgb; + float n_out2p1 = tex_frg_2_read.a; + +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// BlendLuminosity:4 + vec3 n_out4p0; + { + n_out4p0.rgb = luminosity(n_out2p0.rgb, n_out3p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -413.315, 95.4689 ) +mode = 1 +flags/light_only = false +nodes/fragment/2/node = SubResource( 118 ) +nodes/fragment/2/position = Vector2( -80, 40 ) +nodes/fragment/3/node = SubResource( 121 ) +nodes/fragment/3/position = Vector2( -80, 260 ) +nodes/fragment/4/node = SubResource( 122 ) +nodes/fragment/4/position = Vector2( 158.685, 170.469 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 4, 0, 3, 0, 4, 1, 4, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=120] +shader = SubResource( 119 ) + +[sub_resource type="VisualShaderNodeCustom" id=126] +initialized = true +script = ExtResource( 19 ) + +[sub_resource type="OpenSimplexNoise" id=127] + +[sub_resource type="NoiseTexture" id=128] +seamless = true +noise = SubResource( 127 ) + +[sub_resource type="VisualShaderNodeTexture" id=129] +texture = SubResource( 128 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeTexture" id=130] +texture = ExtResource( 9 ) +texture_type = 1 + +[sub_resource type="VisualShader" id=131] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_3 : hint_albedo; +uniform sampler2D tex_frg_4 : hint_albedo; + + +// BlendPinLight + + float pinLight( float s, float d ) + { + return (2.0 * s - 1.0 > d) ? 2.0 * s - 1.0 : ((s < 0.5 * d) ? 2.0 * s : d); + } + + vec3 blend_pin_light( vec3 s, vec3 d ) + { + vec3 c; + c.x = pinLight(s.x,d.x); + c.y = pinLight(s.y,d.y); + c.z = pinLight(s.z,d.z); + return c; + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// Texture:4 + vec4 tex_frg_4_read = texture(tex_frg_4, UV.xy); + vec3 n_out4p0 = tex_frg_4_read.rgb; + float n_out4p1 = tex_frg_4_read.a; + +// BlendPinLight:2 + vec3 n_out2p0; + { + n_out2p0.rgb = blend_pin_light(n_out3p0.rgb, n_out4p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out2p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -418.266, 13.4944 ) +mode = 1 +flags/light_only = false +nodes/fragment/2/node = SubResource( 126 ) +nodes/fragment/2/position = Vector2( 120, 180 ) +nodes/fragment/3/node = SubResource( 129 ) +nodes/fragment/3/position = Vector2( -200, 40 ) +nodes/fragment/4/node = SubResource( 130 ) +nodes/fragment/4/position = Vector2( -200, 260 ) +nodes/fragment/connections = PoolIntArray( 3, 0, 2, 0, 4, 0, 2, 1, 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=125] +shader = SubResource( 131 ) + +[sub_resource type="OpenSimplexNoise" id=132] + +[sub_resource type="NoiseTexture" id=133] +seamless = true +noise = SubResource( 132 ) + +[sub_resource type="VisualShaderNodeTexture" id=134] +texture = SubResource( 133 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeTexture" id=135] +texture = ExtResource( 9 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeCustom" id=138] +initialized = true +script = ExtResource( 20 ) + +[sub_resource type="VisualShader" id=136] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_2 : hint_albedo; +uniform sampler2D tex_frg_3 : hint_albedo; + + +// BlendVividLight + + vec3 blend_color_dodge(vec3 __top_col, vec3 __bot_col) + { + return __bot_col / (1.0 - __top_col); + } + + vec3 blend_color_burn(vec3 __top_col, vec3 __bot_col) + { + return 1.0 - ((1.0 - __bot_col) / __top_col); + } + + float blend_rgb_to_v(vec3 __col) { + return max(max(__col.r / 255.0, __col.g / 255.0), __col.b / 255.0); + } + + vec3 blend_vivid_light(vec3 __top_col, vec3 __bot_col) { + if (blend_rgb_to_v(__top_col) > 0.5) { + return blend_color_dodge(__top_col, __bot_col); + } else { + return blend_color_burn(__top_col, __bot_col); + } + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:2 + vec4 tex_frg_2_read = texture(tex_frg_2, UV.xy); + vec3 n_out2p0 = tex_frg_2_read.rgb; + float n_out2p1 = tex_frg_2_read.a; + +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// BlendVividLight:4 + vec3 n_out4p0; + { + n_out4p0.rgb = blend_vivid_light(n_out2p0.rgb, n_out3p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -418.266, 13.4944 ) +mode = 1 +flags/light_only = false +nodes/fragment/0/position = Vector2( 520, 140 ) +nodes/fragment/2/node = SubResource( 134 ) +nodes/fragment/2/position = Vector2( 0, 20 ) +nodes/fragment/3/node = SubResource( 135 ) +nodes/fragment/3/position = Vector2( 0, 240 ) +nodes/fragment/4/node = SubResource( 138 ) +nodes/fragment/4/position = Vector2( 252.734, 164.494 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 4, 0, 3, 0, 4, 1, 4, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=137] +shader = SubResource( 136 ) + +[sub_resource type="DynamicFont" id=29] +size = 25 +font_data = ExtResource( 8 ) + +[sub_resource type="OpenSimplexNoise" id=96] + +[sub_resource type="NoiseTexture" id=97] +seamless = true +noise = SubResource( 96 ) + +[sub_resource type="VisualShaderNodeTexture" id=98] +texture = SubResource( 97 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeTexture" id=99] +texture = ExtResource( 9 ) + +[sub_resource type="VisualShaderNodeCustom" id=139] +initialized = true +script = ExtResource( 21 ) + +[sub_resource type="VisualShader" id=140] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_3 : hint_albedo; +uniform sampler2D tex_frg_4; + + +// BlendDarkerColor + + vec3 darkerColor( vec3 s, vec3 d ) + { + return (s.x + s.y + s.z < d.x + d.y + d.z) ? s : d; + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// Texture:4 + vec4 tex_frg_4_read = texture(tex_frg_4, UV.xy); + vec3 n_out4p0 = tex_frg_4_read.rgb; + float n_out4p1 = tex_frg_4_read.a; + +// BlendDarkerColor:5 + vec3 n_out5p0; + { + n_out5p0.rgb = darkerColor(n_out3p0.rgb, n_out4p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out5p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -387.266, -0.505585 ) +mode = 1 +flags/light_only = false +nodes/fragment/3/node = SubResource( 98 ) +nodes/fragment/3/position = Vector2( -160, 20 ) +nodes/fragment/4/node = SubResource( 99 ) +nodes/fragment/4/position = Vector2( -160, 240 ) +nodes/fragment/5/node = SubResource( 139 ) +nodes/fragment/5/position = Vector2( 105.734, 140.494 ) +nodes/fragment/connections = PoolIntArray( 3, 0, 5, 0, 4, 0, 5, 1, 5, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=141] +shader = SubResource( 140 ) + +[sub_resource type="DynamicFont" id=94] +font_data = ExtResource( 8 ) + +[sub_resource type="VisualShaderNodeCustom" id=145] +initialized = true +script = ExtResource( 22 ) + +[sub_resource type="VisualShader" id=142] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_3 : hint_albedo; +uniform sampler2D tex_frg_4; + + +// BlendExclusion + + vec3 exclusion( vec3 s, vec3 d ) + { + return s + d - 2.0 * s * d; + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// Texture:4 + vec4 tex_frg_4_read = texture(tex_frg_4, UV.xy); + vec3 n_out4p0 = tex_frg_4_read.rgb; + float n_out4p1 = tex_frg_4_read.a; + +// BlendExclusion:5 + vec3 n_out5p0; + { + n_out5p0.rgb = exclusion(n_out3p0.rgb, n_out4p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out5p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -387.266, -0.505585 ) +mode = 1 +flags/light_only = false +nodes/fragment/3/node = SubResource( 98 ) +nodes/fragment/3/position = Vector2( -160, 20 ) +nodes/fragment/4/node = SubResource( 99 ) +nodes/fragment/4/position = Vector2( -160, 240 ) +nodes/fragment/5/node = SubResource( 145 ) +nodes/fragment/5/position = Vector2( 109.734, 159.494 ) +nodes/fragment/connections = PoolIntArray( 3, 0, 5, 0, 4, 0, 5, 1, 5, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=143] +shader = SubResource( 142 ) + +[sub_resource type="VisualShaderNodeCustom" id=95] +initialized = true +script = ExtResource( 15 ) + +[sub_resource type="VisualShader" id=144] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_3 : hint_albedo; +uniform sampler2D tex_frg_4; + + +// BlendGammaDark + + vec3 blend_gamma_dark(vec3 __top_col, vec3 __bot_col) + { + return pow(__bot_col, (1.0 / __top_col)); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// Texture:4 + vec4 tex_frg_4_read = texture(tex_frg_4, UV.xy); + vec3 n_out4p0 = tex_frg_4_read.rgb; + float n_out4p1 = tex_frg_4_read.a; + +// BlendGammaDark:2 + vec3 n_out2p0; + { + n_out2p0.rgb = blend_gamma_dark(n_out3p0.rgb, n_out4p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out2p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -387.266, -0.505585 ) +mode = 1 +flags/light_only = false +nodes/fragment/2/node = SubResource( 95 ) +nodes/fragment/2/position = Vector2( 140, 160 ) +nodes/fragment/3/node = SubResource( 98 ) +nodes/fragment/3/position = Vector2( -160, 20 ) +nodes/fragment/4/node = SubResource( 99 ) +nodes/fragment/4/position = Vector2( -160, 240 ) +nodes/fragment/connections = PoolIntArray( 3, 0, 2, 0, 4, 0, 2, 1, 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=101] +shader = SubResource( 144 ) + +[sub_resource type="OpenSimplexNoise" id=87] + +[sub_resource type="NoiseTexture" id=88] +seamless = true +noise = SubResource( 87 ) + +[sub_resource type="VisualShaderNodeTexture" id=89] +texture = SubResource( 88 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeTexture" id=90] +texture = ExtResource( 9 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeCustom" id=93] +initialized = true +script = ExtResource( 14 ) + +[sub_resource type="VisualShader" id=91] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_2 : hint_albedo; +uniform sampler2D tex_frg_3 : hint_albedo; + + +// BlendHardMix + + vec3 hardMix( vec3 s, vec3 d ) + { + return floor(s + d); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:2 + vec4 tex_frg_2_read = texture(tex_frg_2, UV.xy); + vec3 n_out2p0 = tex_frg_2_read.rgb; + float n_out2p1 = tex_frg_2_read.a; + +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// BlendHardMix:4 + vec3 n_out4p0; + { + n_out4p0.rgb = hardMix(n_out2p0.rgb, n_out3p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -320.315, 60.4689 ) +mode = 1 +flags/light_only = false +nodes/fragment/2/node = SubResource( 89 ) +nodes/fragment/2/position = Vector2( -80, 40 ) +nodes/fragment/3/node = SubResource( 90 ) +nodes/fragment/3/position = Vector2( -80, 280 ) +nodes/fragment/4/node = SubResource( 93 ) +nodes/fragment/4/position = Vector2( 160, 180 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 4, 0, 3, 0, 4, 1, 4, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=92] +shader = SubResource( 91 ) + +[sub_resource type="OpenSimplexNoise" id=109] + +[sub_resource type="NoiseTexture" id=110] +seamless = true +noise = SubResource( 109 ) + +[sub_resource type="VisualShaderNodeTexture" id=111] +texture = SubResource( 110 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeTexture" id=112] +texture = ExtResource( 9 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeCustom" id=115] +initialized = true +script = ExtResource( 17 ) + +[sub_resource type="VisualShader" id=113] +code = "shader_type canvas_item; +uniform sampler2D tex_frg_2 : hint_albedo; +uniform sampler2D tex_frg_3 : hint_albedo; + + +// BlendLinearBurn + + vec3 blend_linear_burn(vec3 __top_col, vec3 __bot_col) + { + return 1.0- ((1.0 - __top_col) + (1.0 - __bot_col)); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Texture:2 + vec4 tex_frg_2_read = texture(tex_frg_2, UV.xy); + vec3 n_out2p0 = tex_frg_2_read.rgb; + float n_out2p1 = tex_frg_2_read.a; + +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, UV.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// BlendLinearBurn:4 + vec3 n_out4p0; + { + n_out4p0.rgb = blend_linear_burn(n_out2p0.rgb, n_out3p0.rgb); + } + +// Output:0 + COLOR.rgb = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -396.315, 7.46887 ) +mode = 1 +flags/light_only = false +nodes/fragment/2/node = SubResource( 111 ) +nodes/fragment/2/position = Vector2( -60, 40 ) +nodes/fragment/3/node = SubResource( 112 ) +nodes/fragment/3/position = Vector2( -60, 260 ) +nodes/fragment/4/node = SubResource( 115 ) +nodes/fragment/4/position = Vector2( 162.685, 151.469 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 4, 0, 3, 0, 4, 1, 4, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=114] +shader = SubResource( 113 ) + +[sub_resource type="DynamicFont" id=30] +size = 32 +font_data = ExtResource( 8 ) + +[sub_resource type="VisualShaderNodeVectorScalarMix" id=38] +default_input_values = [ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, 0.5 ] + +[sub_resource type="VisualShaderNodeScalarOp" id=39] +operator = 9 + +[sub_resource type="VisualShaderNodeColorUniform" id=40] +uniform_name = "color" +default_value_enabled = true + +[sub_resource type="VisualShaderNodeCustom" id=54] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, 0.25 ] +initialized = true +script = ExtResource( 6 ) + +[sub_resource type="VisualShader" id=55] +code = "shader_type canvas_item; +uniform vec4 color : hint_color = vec4(1.000000, 1.000000, 1.000000, 1.000000); + + +// Circle + + float sdCircle(vec2 pos, float r) { + return length(pos) - r; + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// ColorUniform:5 + vec3 n_out5p0 = color.rgb; + float n_out5p1 = color.a; + +// Circle:6 + vec3 n_in6p1 = vec3(0.50000, 0.50000, 0.00000); + float n_in6p2 = 0.25000; + float n_out6p0; + { + n_out6p0 = sdCircle(UV.xy - n_in6p1.xy, n_in6p2); + } + +// ScalarOp:4 + float n_in4p1 = 0.00000; + float n_out4p0 = step(n_out6p0, n_in4p1); + +// VectorScalarMix:3 + vec3 n_in3p0 = vec3(0.00000, 0.00000, 0.00000); + vec3 n_out3p0 = mix(n_in3p0, n_out5p0, n_out4p0); + +// Output:0 + COLOR.rgb = n_out3p0; + COLOR.a = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -354.315, -123.531 ) +mode = 1 +flags/light_only = false +nodes/fragment/0/position = Vector2( 420, 80 ) +nodes/fragment/3/node = SubResource( 38 ) +nodes/fragment/3/position = Vector2( 120, 20 ) +nodes/fragment/4/node = SubResource( 39 ) +nodes/fragment/4/position = Vector2( -140, 120 ) +nodes/fragment/5/node = SubResource( 40 ) +nodes/fragment/5/position = Vector2( -260, -80 ) +nodes/fragment/6/node = SubResource( 54 ) +nodes/fragment/6/position = Vector2( -395.315, 112.469 ) +nodes/fragment/connections = PoolIntArray( 4, 0, 3, 2, 3, 0, 0, 0, 5, 0, 3, 1, 4, 0, 0, 1, 6, 0, 4, 0 ) + +[sub_resource type="ShaderMaterial" id=56] +shader = SubResource( 55 ) +shader_param/color = Color( 0.168627, 0.623529, 0.443137, 1 ) + +[sub_resource type="DynamicFont" id=31] +font_data = ExtResource( 8 ) + +[sub_resource type="VisualShaderNodeCustom" id=41] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, Vector3( 0.25, 0.25, 0 ), 3, Vector3( 0.2, 0.2, 0.2 ), 4, 0.0 ] +initialized = true +script = ExtResource( 5 ) + +[sub_resource type="VisualShader" id=42] +code = "shader_type canvas_item; +uniform vec4 color : hint_color = vec4(1.000000, 1.000000, 1.000000, 1.000000); + + +// RoundedBox + + float sdRoundedBox( in vec2 __pos, in vec2 __proportions, in vec3 __radia, in float __4radia ) + { + __radia.xy = (__pos.x > 0.0) ? __radia.xy : vec2(__4radia, __radia.z); + __radia.x = (__pos.y > 0.0) ? __radia.x : __radia.y; + vec2 __q = abs(__pos) - __proportions + __radia.x; + return min(max(__q.x, __q.y), 0.0) + length(max(__q, 0.0)) - __radia.x; + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// ColorUniform:5 + vec3 n_out5p0 = color.rgb; + float n_out5p1 = color.a; + +// RoundedBox:6 + vec3 n_in6p1 = vec3(0.50000, 0.50000, 0.00000); + vec3 n_in6p2 = vec3(0.25000, 0.25000, 0.00000); + vec3 n_in6p3 = vec3(0.20000, 0.20000, 0.20000); + float n_in6p4 = 0.00000; + float n_out6p0; + { + n_out6p0 = sdRoundedBox(UV.xy - n_in6p1.xy, n_in6p2.xy, n_in6p3.xyz, n_in6p4); + } + +// ScalarOp:4 + float n_in4p1 = 0.00000; + float n_out4p0 = step(n_out6p0, n_in4p1); + +// VectorScalarMix:3 + vec3 n_in3p0 = vec3(0.00000, 0.00000, 0.00000); + vec3 n_out3p0 = mix(n_in3p0, n_out5p0, n_out4p0); + +// Output:0 + COLOR.rgb = n_out3p0; + COLOR.a = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -584.315, -104.531 ) +mode = 1 +flags/light_only = false +nodes/fragment/0/position = Vector2( 420, 80 ) +nodes/fragment/3/node = SubResource( 38 ) +nodes/fragment/3/position = Vector2( 120, 20 ) +nodes/fragment/4/node = SubResource( 39 ) +nodes/fragment/4/position = Vector2( -140, 120 ) +nodes/fragment/5/node = SubResource( 40 ) +nodes/fragment/5/position = Vector2( -260, -80 ) +nodes/fragment/6/node = SubResource( 41 ) +nodes/fragment/6/position = Vector2( -480, 80 ) +nodes/fragment/connections = PoolIntArray( 4, 0, 3, 2, 3, 0, 0, 0, 5, 0, 3, 1, 4, 0, 0, 1, 6, 0, 4, 0 ) + +[sub_resource type="ShaderMaterial" id=17] +shader = SubResource( 42 ) +shader_param/color = Color( 0.168627, 0.623529, 0.442279, 1 ) + +[sub_resource type="DynamicFont" id=32] +font_data = ExtResource( 8 ) + +[sub_resource type="VisualShaderNodeCustom" id=43] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, Vector3( 0.25, 0.25, 0 ) ] +initialized = true +script = ExtResource( 10 ) + +[sub_resource type="VisualShaderNodeVectorScalarMix" id=44] + +[sub_resource type="VisualShaderNodeScalarOp" id=45] +operator = 9 + +[sub_resource type="VisualShaderNodeColorUniform" id=46] +uniform_name = "color" +default_value_enabled = true + +[sub_resource type="VisualShader" id=47] +code = "shader_type canvas_item; +uniform vec4 color : hint_color = vec4(1.000000, 1.000000, 1.000000, 1.000000); + + +// Box + + float sdBox( in vec2 __position, in vec2 __proportions ) + { + vec2 __d = abs(__position) - __proportions; + return length(max(__d, 0.0)) + min(max(__d.x, __d.y), 0.0); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// ColorUniform:5 + vec3 n_out5p0 = color.rgb; + float n_out5p1 = color.a; + +// Box:2 + vec3 n_in2p1 = vec3(0.50000, 0.50000, 0.00000); + vec3 n_in2p2 = vec3(0.25000, 0.25000, 0.00000); + float n_out2p0; + { + n_out2p0 = sdBox(UV.xy - n_in2p1.xy, n_in2p2.xy); + } + +// ScalarOp:4 + float n_in4p1 = 0.00000; + float n_out4p0 = step(n_out2p0, n_in4p1); + +// VectorScalarMix:3 + vec3 n_in3p0 = vec3(0.00000, 0.00000, 0.00000); + vec3 n_out3p0 = mix(n_in3p0, n_out5p0, n_out4p0); + +// Output:0 + COLOR.rgb = n_out3p0; + COLOR.a = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -534.315, -120.531 ) +mode = 1 +flags/light_only = false +nodes/fragment/2/node = SubResource( 43 ) +nodes/fragment/2/position = Vector2( -440, 100 ) +nodes/fragment/3/node = SubResource( 44 ) +nodes/fragment/3/position = Vector2( 120, 80 ) +nodes/fragment/4/node = SubResource( 45 ) +nodes/fragment/4/position = Vector2( -120, 140 ) +nodes/fragment/5/node = SubResource( 46 ) +nodes/fragment/5/position = Vector2( -280, -80 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 4, 0, 4, 0, 3, 2, 5, 0, 3, 1, 3, 0, 0, 0, 4, 0, 0, 1 ) + +[sub_resource type="ShaderMaterial" id=48] +shader = SubResource( 47 ) +shader_param/color = Color( 0.168627, 0.623529, 0.443137, 1 ) + +[sub_resource type="DynamicFont" id=33] +font_data = ExtResource( 8 ) + +[sub_resource type="VisualShaderNodeCustom" id=49] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, Vector3( -0.25, -0.25, 0 ), 3, Vector3( 0.25, 0.25, 0 ), 4, 0.2 ] +initialized = true +script = ExtResource( 2 ) + +[sub_resource type="VisualShader" id=50] +code = "shader_type canvas_item; +uniform vec4 color : hint_color = vec4(1.000000, 1.000000, 1.000000, 1.000000); + + +// RotatedBox + + float sdRotatedBox( in vec2 p, in vec2 a, in vec2 b, float th ) + { + float l = length(b-a); + vec2 d = (b-a)/l; + vec2 q = (p-(a+b)*0.5); + q = mat2(vec2(d.x,-d.y), vec2(d.y,d.x))*q; + q = abs(q)-vec2(l,th)*0.5; + return length(max(q,0.0)) + min(max(q.x,q.y),0.0); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// ColorUniform:5 + vec3 n_out5p0 = color.rgb; + float n_out5p1 = color.a; + +// RotatedBox:6 + vec3 n_in6p1 = vec3(0.50000, 0.50000, 0.00000); + vec3 n_in6p2 = vec3(-0.25000, -0.25000, 0.00000); + vec3 n_in6p3 = vec3(0.25000, 0.25000, 0.00000); + float n_in6p4 = 0.20000; + float n_out6p0; + { + n_out6p0 = sdRotatedBox(UV.xy - n_in6p1.xy, n_in6p2.xy, n_in6p3.xy, n_in6p4); + } + +// ScalarOp:4 + float n_in4p1 = 0.00000; + float n_out4p0 = step(n_out6p0, n_in4p1); + +// VectorScalarMix:3 + vec3 n_in3p0 = vec3(0.00000, 0.00000, 0.00000); + vec3 n_out3p0 = mix(n_in3p0, n_out5p0, n_out4p0); + +// Output:0 + COLOR.rgb = n_out3p0; + COLOR.a = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -309.315, -144.531 ) +mode = 1 +flags/light_only = false +nodes/fragment/0/position = Vector2( 420, 80 ) +nodes/fragment/3/node = SubResource( 38 ) +nodes/fragment/3/position = Vector2( 120, 20 ) +nodes/fragment/4/node = SubResource( 39 ) +nodes/fragment/4/position = Vector2( -140, 120 ) +nodes/fragment/5/node = SubResource( 40 ) +nodes/fragment/5/position = Vector2( -260, -80 ) +nodes/fragment/6/node = SubResource( 49 ) +nodes/fragment/6/position = Vector2( -420, 100 ) +nodes/fragment/connections = PoolIntArray( 4, 0, 3, 2, 3, 0, 0, 0, 5, 0, 3, 1, 4, 0, 0, 1, 6, 0, 4, 0 ) + +[sub_resource type="ShaderMaterial" id=51] +shader = SubResource( 50 ) +shader_param/color = Color( 0.168627, 0.623529, 0.443137, 1 ) + +[sub_resource type="DynamicFont" id=34] +font_data = ExtResource( 8 ) + +[sub_resource type="VisualShaderNodeCustom" id=20] +output_port_for_preview = 0 +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, Vector3( 0.25, 0.25, 0 ) ] +initialized = true +script = ExtResource( 1 ) + +[sub_resource type="VisualShaderNodeVectorInterp" id=21] +output_port_for_preview = 0 +default_input_values = [ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 0.5, 0.5, 0.5 ) ] + +[sub_resource type="VisualShaderNodeColorUniform" id=22] +uniform_name = "ColorUniform" +default_value_enabled = true + +[sub_resource type="VisualShaderNodeScalarOp" id=23] +output_port_for_preview = 0 +operator = 9 + +[sub_resource type="VisualShaderNodeScalarFunc" id=24] +function = 31 + +[sub_resource type="VisualShader" id=25] +code = "shader_type canvas_item; +uniform vec4 ColorUniform : hint_color = vec4(1.000000, 1.000000, 1.000000, 1.000000); + + +// Rhombus + + float ndot(vec2 a, vec2 b ) { return a.x*b.x - a.y*b.y; } + float sdRhombus( in vec2 p, in vec2 b ) + { + p = abs(p); + float h = clamp( ndot(b-2.0*p,b)/dot(b,b), -1.0, 1.0 ); + float d = length( p-0.5*b*vec2(1.0-h,1.0+h) ); + return d * sign( p.x*b.y + p.y*b.x - b.x*b.y ); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// ColorUniform:5 + vec3 n_out5p0 = ColorUniform.rgb; + float n_out5p1 = ColorUniform.a; + +// Rhombus:2 + vec3 n_in2p1 = vec3(0.50000, 0.50000, 0.00000); + vec3 n_in2p2 = vec3(0.25000, 0.25000, 0.00000); + float n_out2p0; + { + n_out2p0 = sdRhombus(UV.xy - n_in2p1.xy, n_in2p2.xy); + } + +// ScalarOp:6 + float n_in6p0 = 0.00000; + float n_out6p0 = step(n_in6p0, n_out2p0); + +// VectorMix:4 + vec3 n_in4p1 = vec3(0.00000, 0.00000, 0.00000); + vec3 n_out4p0 = mix(n_out5p0, n_in4p1, vec3(n_out6p0)); + +// ScalarFunc:7 + float n_out7p0 = 1.0 - n_out6p0; + +// Output:0 + COLOR.rgb = n_out4p0; + COLOR.a = n_out7p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -426.417, 78.4167 ) +mode = 1 +flags/light_only = false +nodes/fragment/0/position = Vector2( 440, 180 ) +nodes/fragment/2/node = SubResource( 20 ) +nodes/fragment/2/position = Vector2( -520, 320 ) +nodes/fragment/4/node = SubResource( 21 ) +nodes/fragment/4/position = Vector2( 180, 180 ) +nodes/fragment/5/node = SubResource( 22 ) +nodes/fragment/5/position = Vector2( -460, 120 ) +nodes/fragment/6/node = SubResource( 23 ) +nodes/fragment/6/position = Vector2( -60, 300 ) +nodes/fragment/7/node = SubResource( 24 ) +nodes/fragment/7/position = Vector2( 160, 440 ) +nodes/fragment/connections = PoolIntArray( 5, 0, 4, 0, 2, 0, 6, 1, 6, 0, 4, 2, 4, 0, 0, 0, 6, 0, 7, 0, 7, 0, 0, 1 ) + +[sub_resource type="ShaderMaterial" id=26] +shader = SubResource( 25 ) +shader_param/ColorUniform = Color( 0.168627, 0.623529, 0.443137, 1 ) + +[sub_resource type="DynamicFont" id=35] +font_data = ExtResource( 8 ) + +[sub_resource type="VisualShaderNodeCustom" id=52] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, 0.15, 3, 0.35, 4, 0.25 ] +initialized = true +script = ExtResource( 4 ) + +[sub_resource type="VisualShader" id=37] +code = "shader_type canvas_item; +uniform vec4 color : hint_color = vec4(1.000000, 1.000000, 1.000000, 1.000000); + + +// Trapezoid + + float sdTrapezoid( in vec2 p, in float r1, float r2, float he ) + { + vec2 k1 = vec2(r2,he); + vec2 k2 = vec2(r2-r1,2.0*he); + p.x = abs(p.x); + vec2 ca = vec2(p.x-min(p.x,(p.y<0.0)?r1:r2), abs(p.y)-he); + vec2 cb = p - k1 + k2*clamp( dot(k1-p,k2)/dot(k2, k2), 0.0, 1.0 ); + float s = (cb.x<0.0 && ca.y<0.0) ? -1.0 : 1.0; + return s*sqrt( min(dot(ca, ca),dot(cb, cb)) ); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// ColorUniform:5 + vec3 n_out5p0 = color.rgb; + float n_out5p1 = color.a; + +// Trapezoid:6 + vec3 n_in6p1 = vec3(0.50000, 0.50000, 0.00000); + float n_in6p2 = 0.15000; + float n_in6p3 = 0.35000; + float n_in6p4 = 0.25000; + float n_out6p0; + { + n_out6p0 = sdTrapezoid(UV.xy - n_in6p1.xy, n_in6p2, n_in6p3, n_in6p4); + } + +// ScalarOp:4 + float n_in4p1 = 0.00000; + float n_out4p0 = step(n_out6p0, n_in4p1); + +// VectorScalarMix:3 + vec3 n_in3p0 = vec3(0.00000, 0.00000, 0.00000); + vec3 n_out3p0 = mix(n_in3p0, n_out5p0, n_out4p0); + +// Output:0 + COLOR.rgb = n_out3p0; + COLOR.a = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -613.315, -131.531 ) +mode = 1 +flags/light_only = false +nodes/fragment/0/position = Vector2( 420, 80 ) +nodes/fragment/3/node = SubResource( 38 ) +nodes/fragment/3/position = Vector2( 120, 20 ) +nodes/fragment/4/node = SubResource( 39 ) +nodes/fragment/4/position = Vector2( -140, 120 ) +nodes/fragment/5/node = SubResource( 40 ) +nodes/fragment/5/position = Vector2( -260, -80 ) +nodes/fragment/6/node = SubResource( 52 ) +nodes/fragment/6/position = Vector2( -434.315, 110.469 ) +nodes/fragment/connections = PoolIntArray( 4, 0, 3, 2, 3, 0, 0, 0, 5, 0, 3, 1, 4, 0, 0, 1, 6, 0, 4, 0 ) + +[sub_resource type="ShaderMaterial" id=53] +shader = SubResource( 37 ) +shader_param/color = Color( 0.168627, 0.623529, 0.443137, 1 ) + +[sub_resource type="VisualShaderNodeCustom" id=57] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, 0.15, 3, 0.3, 4, 0.2 ] +initialized = true +script = ExtResource( 7 ) + +[sub_resource type="VisualShader" id=58] +code = "shader_type canvas_item; +uniform vec4 color : hint_color = vec4(1.000000, 1.000000, 1.000000, 1.000000); + + +// Parallelogram + + float sdParallelogram( in vec2 p, float wi, float he, float sk ) + { + vec2 e = vec2(sk,he); + p = (p.y<0.0)?-p:p; + vec2 w = p - e; w.x -= clamp(w.x,-wi,wi); + vec2 d = vec2(dot(w,w), -w.y); + float s = p.x*e.y - p.y*e.x; + p = (s<0.0)?-p:p; + vec2 v = p - vec2(wi,0); v -= e*clamp(dot(v,e)/dot(e,e),-1.0,1.0); + d = min( d, vec2(dot(v,v), wi*he-abs(s))); + return sqrt(d.x)*sign(-d.y); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// ColorUniform:5 + vec3 n_out5p0 = color.rgb; + float n_out5p1 = color.a; + +// Parallelogram:6 + vec3 n_in6p1 = vec3(0.50000, 0.50000, 0.00000); + float n_in6p2 = 0.15000; + float n_in6p3 = 0.30000; + float n_in6p4 = 0.20000; + float n_out6p0; + { + n_out6p0 = sdParallelogram(UV.xy - n_in6p1.xy, n_in6p2, n_in6p3, n_in6p4); + } + +// ScalarOp:4 + float n_in4p1 = 0.00000; + float n_out4p0 = step(n_out6p0, n_in4p1); + +// VectorScalarMix:3 + vec3 n_in3p0 = vec3(0.00000, 0.00000, 0.00000); + vec3 n_out3p0 = mix(n_in3p0, n_out5p0, n_out4p0); + +// Output:0 + COLOR.rgb = n_out3p0; + COLOR.a = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -590.315, -58.5311 ) +mode = 1 +flags/light_only = false +nodes/fragment/0/position = Vector2( 420, 80 ) +nodes/fragment/3/node = SubResource( 38 ) +nodes/fragment/3/position = Vector2( 120, 20 ) +nodes/fragment/4/node = SubResource( 39 ) +nodes/fragment/4/position = Vector2( -140, 120 ) +nodes/fragment/5/node = SubResource( 40 ) +nodes/fragment/5/position = Vector2( -260, -80 ) +nodes/fragment/6/node = SubResource( 57 ) +nodes/fragment/6/position = Vector2( -419.315, 130.469 ) +nodes/fragment/connections = PoolIntArray( 4, 0, 3, 2, 3, 0, 0, 0, 5, 0, 3, 1, 4, 0, 0, 1, 6, 0, 4, 0 ) + +[sub_resource type="ShaderMaterial" id=59] +shader = SubResource( 58 ) +shader_param/color = Color( 0.168627, 0.623529, 0.443137, 1 ) + +[sub_resource type="VisualShaderNodeCustom" id=60] +default_input_values = [ 1, Vector3( 0.5, 0.25, 0 ), 2, Vector3( 0.25, 0.5, 0 ) ] +initialized = true +script = ExtResource( 3 ) + +[sub_resource type="VisualShader" id=61] +code = "shader_type canvas_item; +uniform vec4 color : hint_color = vec4(1.000000, 1.000000, 1.000000, 1.000000); + + +// Triangle + + float sdTriangleIsosceles( in vec2 p, in vec2 q ) + { + p.x = abs(p.x); + vec2 a = p - q*clamp( dot(p,q)/dot(q,q), 0.0, 1.0 ); + vec2 b = p - q*vec2( clamp( p.x/q.x, 0.0, 1.0 ), 1.0 ); + float s = -sign( q.y ); + vec2 d = min( vec2( dot(a,a), s*(p.x*q.y-p.y*q.x) ), + vec2( dot(b,b), s*(p.y-q.y) )); + return -sqrt(d.x)*sign(d.y); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// ColorUniform:5 + vec3 n_out5p0 = color.rgb; + float n_out5p1 = color.a; + +// Triangle:6 + vec3 n_in6p1 = vec3(0.50000, 0.25000, 0.00000); + vec3 n_in6p2 = vec3(0.25000, 0.50000, 0.00000); + float n_out6p0; + { + n_out6p0 = sdTriangleIsosceles(UV.xy - n_in6p1.xy, n_in6p2.xy); + } + +// ScalarOp:4 + float n_in4p1 = 0.00000; + float n_out4p0 = step(n_out6p0, n_in4p1); + +// VectorScalarMix:3 + vec3 n_in3p0 = vec3(0.00000, 0.00000, 0.00000); + vec3 n_out3p0 = mix(n_in3p0, n_out5p0, n_out4p0); + +// Output:0 + COLOR.rgb = n_out3p0; + COLOR.a = n_out4p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -590.315, -58.5311 ) +mode = 1 +flags/light_only = false +nodes/fragment/0/position = Vector2( 420, 80 ) +nodes/fragment/3/node = SubResource( 38 ) +nodes/fragment/3/position = Vector2( 120, 20 ) +nodes/fragment/4/node = SubResource( 39 ) +nodes/fragment/4/position = Vector2( -140, 120 ) +nodes/fragment/5/node = SubResource( 40 ) +nodes/fragment/5/position = Vector2( -260, -80 ) +nodes/fragment/6/node = SubResource( 60 ) +nodes/fragment/6/position = Vector2( -440, 140 ) +nodes/fragment/connections = PoolIntArray( 4, 0, 3, 2, 3, 0, 0, 0, 5, 0, 3, 1, 4, 0, 0, 1, 6, 0, 4, 0 ) + +[sub_resource type="ShaderMaterial" id=62] +shader = SubResource( 61 ) +shader_param/color = Color( 0.168627, 0.623529, 0.443137, 1 ) + +[node name="Examples" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="BlendModes" type="Control" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="VBoxContainer" type="VBoxContainer" parent="BlendModes"] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer"] +margin_right = 1024.0 +margin_bottom = 36.0 +size_flags_horizontal = 3 +size_flags_vertical = 5 +custom_fonts/font = SubResource( 27 ) +text = "Blending Modes" +align = 1 +valign = 1 + +[node name="VBoxContainer" type="VBoxContainer" parent="BlendModes/VBoxContainer"] +margin_top = 40.0 +margin_right = 1024.0 +margin_bottom = 600.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Lighten" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer"] +margin_right = 1024.0 +margin_bottom = 278.0 +size_flags_vertical = 3 + +[node name="LightenLabel" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten"] +margin_right = 1024.0 +margin_bottom = 29.0 +custom_fonts/font = SubResource( 28 ) +text = "Lighten" +align = 1 + +[node name="HBoxContainer" type="HBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten"] +margin_top = 33.0 +margin_right = 1024.0 +margin_bottom = 197.0 + +[node name="GammaIlluminationPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer"] +margin_right = 100.0 +margin_bottom = 164.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="GammaIllumination" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/GammaIlluminationPreview"] +material = SubResource( 69 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/GammaIlluminationPreview"] +margin_top = 104.0 +margin_right = 100.0 +margin_bottom = 164.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 70 ) +text = "Gamma Illumination" +align = 1 +valign = 1 +autowrap = true + +[node name="GammaLightPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer"] +margin_left = 104.0 +margin_right = 204.0 +margin_bottom = 164.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="GammaLight" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/GammaLightPreview"] +material = SubResource( 77 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/GammaLightPreview"] +margin_top = 114.0 +margin_right = 100.0 +margin_bottom = 153.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 78 ) +text = "Gamma Light" +align = 1 +valign = 1 +autowrap = true + +[node name="LighterColorPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer"] +margin_left = 208.0 +margin_right = 308.0 +margin_bottom = 164.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="LighterColor" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/LighterColorPreview"] +material = SubResource( 108 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/LighterColorPreview"] +margin_top = 114.0 +margin_right = 100.0 +margin_bottom = 153.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 86 ) +text = "Lighter Color" +align = 1 +valign = 1 +autowrap = true + +[node name="LinearLightPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer"] +margin_left = 312.0 +margin_right = 412.0 +margin_bottom = 164.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="LinearLight" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/LinearLightPreview"] +material = SubResource( 85 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/LinearLightPreview"] +margin_top = 114.0 +margin_right = 100.0 +margin_bottom = 153.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 86 ) +text = "Linear Light" +align = 1 +valign = 1 +autowrap = true + +[node name="LuminosityPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer"] +margin_left = 416.0 +margin_right = 516.0 +margin_bottom = 164.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="Luminosity" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/LuminosityPreview"] +material = SubResource( 120 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/LuminosityPreview"] +margin_top = 125.0 +margin_right = 100.0 +margin_bottom = 143.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 86 ) +text = "Luminosity" +align = 1 +valign = 1 +autowrap = true + +[node name="PinLightPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer"] +margin_left = 520.0 +margin_right = 620.0 +margin_bottom = 164.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="PinLight" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/PinLightPreview"] +material = SubResource( 125 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/PinLightPreview"] +margin_top = 125.0 +margin_right = 100.0 +margin_bottom = 143.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 86 ) +text = "Pin Light" +align = 1 +valign = 1 +autowrap = true + +[node name="VividLightPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer"] +margin_left = 624.0 +margin_right = 724.0 +margin_bottom = 164.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="VividLight" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/VividLightPreview"] +material = SubResource( 137 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Lighten/HBoxContainer/VividLightPreview"] +margin_top = 125.0 +margin_right = 100.0 +margin_bottom = 143.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 86 ) +text = "Vivid Light" +align = 1 +valign = 1 +autowrap = true + +[node name="Darken" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer"] +margin_top = 282.0 +margin_right = 1024.0 +margin_bottom = 560.0 +size_flags_vertical = 3 + +[node name="DarkenLabel" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Darken"] +margin_right = 1024.0 +margin_bottom = 29.0 +custom_fonts/font = SubResource( 29 ) +text = "Darken" +align = 1 + +[node name="HBoxContainer" type="HBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Darken"] +margin_top = 33.0 +margin_right = 1024.0 +margin_bottom = 176.0 + +[node name="DarkerColorPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer"] +margin_right = 100.0 +margin_bottom = 143.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="DarkerColor" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer/DarkerColorPreview"] +material = SubResource( 141 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer/DarkerColorPreview"] +margin_top = 104.0 +margin_right = 100.0 +margin_bottom = 143.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 94 ) +text = "Darker Color" +align = 1 +autowrap = true + +[node name="ExclusionPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer"] +margin_left = 104.0 +margin_right = 204.0 +margin_bottom = 143.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="Exclusion" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer/ExclusionPreview"] +material = SubResource( 143 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer/ExclusionPreview"] +margin_top = 114.0 +margin_right = 100.0 +margin_bottom = 132.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 94 ) +text = "Exclusion" +align = 1 +autowrap = true + +[node name="GammaDarkPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer"] +margin_left = 208.0 +margin_right = 308.0 +margin_bottom = 143.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="GammaDark" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer/GammaDarkPreview"] +material = SubResource( 101 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer/GammaDarkPreview"] +margin_top = 104.0 +margin_right = 100.0 +margin_bottom = 143.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 94 ) +text = "Gamma Dark" +align = 1 +autowrap = true + +[node name="HardMixPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer"] +margin_left = 312.0 +margin_right = 412.0 +margin_bottom = 143.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="HardMix" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer/HardMixPreview"] +material = SubResource( 92 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer/HardMixPreview"] +margin_top = 114.0 +margin_right = 100.0 +margin_bottom = 132.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 86 ) +text = "Hard Mix" +align = 1 +valign = 1 +autowrap = true + +[node name="LinearBurnPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer"] +margin_left = 416.0 +margin_right = 516.0 +margin_bottom = 143.0 +rect_min_size = Vector2( 100, 100 ) + +[node name="LinearBurn" type="TextureRect" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer/LinearBurnPreview"] +material = SubResource( 114 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +texture = ExtResource( 9 ) +expand = true + +[node name="Label" type="Label" parent="BlendModes/VBoxContainer/VBoxContainer/Darken/HBoxContainer/LinearBurnPreview"] +margin_top = 104.0 +margin_right = 100.0 +margin_bottom = 143.0 +size_flags_vertical = 6 +custom_fonts/font = SubResource( 86 ) +text = "Linear Burn" +align = 1 +valign = 1 +autowrap = true + +[node name="Shapes" type="Control" parent="."] +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="VBoxContainer" type="VBoxContainer" parent="Shapes"] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="Label" type="Label" parent="Shapes/VBoxContainer"] +margin_right = 1024.0 +margin_bottom = 36.0 +size_flags_horizontal = 3 +size_flags_vertical = 5 +custom_fonts/font = SubResource( 30 ) +text = "Shapes" +align = 1 +valign = 1 + +[node name="VBoxContainer" type="VBoxContainer" parent="Shapes/VBoxContainer"] +margin_top = 40.0 +margin_right = 1024.0 +margin_bottom = 600.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Normal" type="VBoxContainer" parent="Shapes/VBoxContainer/VBoxContainer"] +margin_right = 1024.0 +margin_bottom = 560.0 +size_flags_vertical = 3 + +[node name="HBoxContainer" type="HBoxContainer" parent="Shapes/VBoxContainer/VBoxContainer/Normal"] +margin_right = 1024.0 +margin_bottom = 143.0 + +[node name="Circle" type="VBoxContainer" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer"] +margin_right = 100.0 +margin_bottom = 143.0 + +[node name="ColorRect" type="ColorRect" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Circle"] +material = SubResource( 56 ) +margin_right = 100.0 +margin_bottom = 121.0 +rect_min_size = Vector2( 100, 100 ) +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Circle"] +margin_top = 125.0 +margin_right = 100.0 +margin_bottom = 143.0 +custom_fonts/font = SubResource( 31 ) +text = "Circle" +align = 1 + +[node name="RoundedBox" type="VBoxContainer" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer"] +margin_left = 104.0 +margin_right = 218.0 +margin_bottom = 143.0 + +[node name="ColorRect" type="ColorRect" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/RoundedBox"] +material = SubResource( 17 ) +margin_right = 114.0 +margin_bottom = 121.0 +rect_min_size = Vector2( 100, 100 ) +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/RoundedBox"] +margin_top = 125.0 +margin_right = 114.0 +margin_bottom = 143.0 +custom_fonts/font = SubResource( 32 ) +text = "Rounded Box" +align = 1 + +[node name="Box" type="VBoxContainer" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer"] +margin_left = 222.0 +margin_right = 322.0 +margin_bottom = 143.0 + +[node name="ColorRect" type="ColorRect" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Box"] +material = SubResource( 48 ) +margin_right = 100.0 +margin_bottom = 121.0 +rect_min_size = Vector2( 100, 100 ) +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Box"] +margin_top = 125.0 +margin_right = 100.0 +margin_bottom = 143.0 +custom_fonts/font = SubResource( 33 ) +text = "Box" +align = 1 + +[node name="RotatedBox" type="VBoxContainer" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer"] +margin_left = 326.0 +margin_right = 436.0 +margin_bottom = 143.0 + +[node name="ColorRect" type="ColorRect" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/RotatedBox"] +material = SubResource( 51 ) +margin_right = 110.0 +margin_bottom = 121.0 +rect_min_size = Vector2( 100, 100 ) +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/RotatedBox"] +margin_top = 125.0 +margin_right = 110.0 +margin_bottom = 143.0 +custom_fonts/font = SubResource( 34 ) +text = "Rotated Box" +align = 1 + +[node name="Rhombus" type="VBoxContainer" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer"] +margin_left = 440.0 +margin_right = 540.0 +margin_bottom = 143.0 + +[node name="ColorRect" type="ColorRect" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Rhombus"] +material = SubResource( 26 ) +margin_right = 100.0 +margin_bottom = 121.0 +rect_min_size = Vector2( 100, 100 ) +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Rhombus"] +margin_top = 125.0 +margin_right = 100.0 +margin_bottom = 143.0 +custom_fonts/font = SubResource( 35 ) +text = "Rhombus" +align = 1 + +[node name="Trapezoid" type="VBoxContainer" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer"] +margin_left = 544.0 +margin_right = 644.0 +margin_bottom = 143.0 + +[node name="ColorRect" type="ColorRect" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Trapezoid"] +material = SubResource( 53 ) +margin_right = 100.0 +margin_bottom = 121.0 +rect_min_size = Vector2( 100, 100 ) +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Trapezoid"] +margin_top = 125.0 +margin_right = 100.0 +margin_bottom = 143.0 +custom_fonts/font = SubResource( 35 ) +text = "Trapezoid" +align = 1 + +[node name="Parallelogram" type="VBoxContainer" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer"] +margin_left = 648.0 +margin_right = 748.0 +margin_bottom = 143.0 + +[node name="ColorRect" type="ColorRect" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Parallelogram"] +material = SubResource( 59 ) +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Parallelogram"] +margin_top = 104.0 +margin_right = 100.0 +margin_bottom = 143.0 +custom_fonts/font = SubResource( 35 ) +text = "Parallelogram" +align = 1 +autowrap = true + +[node name="Triangle" type="VBoxContainer" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer"] +margin_left = 752.0 +margin_right = 852.0 +margin_bottom = 143.0 + +[node name="ColorRect" type="ColorRect" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Triangle"] +material = SubResource( 62 ) +margin_right = 100.0 +margin_bottom = 121.0 +rect_min_size = Vector2( 100, 100 ) +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="Shapes/VBoxContainer/VBoxContainer/Normal/HBoxContainer/Triangle"] +margin_top = 125.0 +margin_right = 100.0 +margin_bottom = 143.0 +custom_fonts/font = SubResource( 35 ) +text = "Triangle" +align = 1 diff --git a/addons/VisualShaderExtras/AddonAssets/examples3D.tscn b/addons/VisualShaderExtras/AddonAssets/examples3D.tscn new file mode 100644 index 0000000..a9eb338 --- /dev/null +++ b/addons/VisualShaderExtras/AddonAssets/examples3D.tscn @@ -0,0 +1,783 @@ +[gd_scene load_steps=55 format=2] + +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Rhombus.gd" type="Script" id=1] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/RotatedBox.gd" type="Script" id=2] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Triangle.gd" type="Script" id=3] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Trapezoid.gd" type="Script" id=4] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/RoundedBox.gd" type="Script" id=5] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Circle.gd" type="Script" id=6] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Parallelogram.gd" type="Script" id=7] +[ext_resource path="res://addons/VisualShaderExtras/UV/UVPolarCoord.gd" type="Script" id=8] +[ext_resource path="res://addons/VisualShaderExtras/UV/UVTwirl.gd" type="Script" id=9] +[ext_resource path="res://addons/VisualShaderExtras/UV/UVFlipbook.gd" type="Script" id=10] +[ext_resource path="res://addons/VisualShaderExtras/Shapes/Box.gd" type="Script" id=11] +[ext_resource path="res://addons/VisualShaderExtras/AddonAssets/DinoSprites - vita.png" type="Texture" id=12] + +[sub_resource type="PlaneMesh" id=1] + +[sub_resource type="VisualShaderNodeCustom" id=34] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, 0.25 ] +initialized = true +script = ExtResource( 6 ) + +[sub_resource type="VisualShader" id=35] +code = "shader_type spatial; +render_mode specular_schlick_ggx, async_visible; + + + +// Circle + + float sdCircle(vec2 pos, float r) { + return length(pos) - r; + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Circle:2 + vec3 n_in2p1 = vec3(0.50000, 0.50000, 0.00000); + float n_in2p2 = 0.25000; + float n_out2p0; + { + n_out2p0 = sdCircle(UV.xy - n_in2p1.xy, n_in2p2); + } + +// Output:0 + ALBEDO = vec3(n_out2p0); + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -402, 101 ) +nodes/fragment/2/node = SubResource( 34 ) +nodes/fragment/2/position = Vector2( 120, 160 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=3] +shader = SubResource( 35 ) + +[sub_resource type="VisualShaderNodeCustom" id=36] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, Vector3( 0.25, 0.25, 0 ), 3, Vector3( 0.2, 0.2, 0.2 ), 4, 0.0 ] +initialized = true +script = ExtResource( 5 ) + +[sub_resource type="VisualShader" id=37] +code = "shader_type spatial; +render_mode specular_schlick_ggx, async_visible; + + + +// RoundedBox + + float sdRoundedBox( in vec2 __pos, in vec2 __proportions, in vec3 __radia, in float __4radia ) + { + __radia.xy = (__pos.x > 0.0) ? __radia.xy : vec2(__4radia, __radia.z); + __radia.x = (__pos.y > 0.0) ? __radia.x : __radia.y; + vec2 __q = abs(__pos) - __proportions + __radia.x; + return min(max(__q.x, __q.y), 0.0) + length(max(__q, 0.0)) - __radia.x; + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// RoundedBox:2 + vec3 n_in2p1 = vec3(0.50000, 0.50000, 0.00000); + vec3 n_in2p2 = vec3(0.25000, 0.25000, 0.00000); + vec3 n_in2p3 = vec3(0.20000, 0.20000, 0.20000); + float n_in2p4 = 0.00000; + float n_out2p0; + { + n_out2p0 = sdRoundedBox(UV.xy - n_in2p1.xy, n_in2p2.xy, n_in2p3.xyz, n_in2p4); + } + +// Output:0 + ALBEDO = vec3(n_out2p0); + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -402, 101 ) +nodes/fragment/2/node = SubResource( 36 ) +nodes/fragment/2/position = Vector2( 100, 160 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=5] +shader = SubResource( 37 ) + +[sub_resource type="VisualShaderNodeCustom" id=38] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, Vector3( 0.25, 0.25, 0 ) ] +initialized = true +script = ExtResource( 11 ) + +[sub_resource type="VisualShader" id=39] +code = "shader_type spatial; +render_mode specular_schlick_ggx, async_visible; + + + +// Box + + float sdBox( in vec2 __position, in vec2 __proportions ) + { + vec2 __d = abs(__position) - __proportions; + return length(max(__d, 0.0)) + min(max(__d.x, __d.y), 0.0); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Box:2 + vec3 n_in2p1 = vec3(0.50000, 0.50000, 0.00000); + vec3 n_in2p2 = vec3(0.25000, 0.25000, 0.00000); + float n_out2p0; + { + n_out2p0 = sdBox(UV.xy - n_in2p1.xy, n_in2p2.xy); + } + +// Output:0 + ALBEDO = vec3(n_out2p0); + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -402, 101 ) +nodes/fragment/2/node = SubResource( 38 ) +nodes/fragment/2/position = Vector2( 100, 180 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=7] +shader = SubResource( 39 ) + +[sub_resource type="VisualShaderNodeCustom" id=20] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, Vector3( -0.25, -0.25, 0 ), 3, Vector3( 0.25, 0.25, 0 ), 4, 0.2 ] +initialized = true +script = ExtResource( 2 ) + +[sub_resource type="VisualShader" id=19] +code = "shader_type spatial; +render_mode specular_schlick_ggx, async_visible; + + + +// RotatedBox + + float sdRotatedBox( in vec2 p, in vec2 a, in vec2 b, float th ) + { + float l = length(b-a); + vec2 d = (b-a)/l; + vec2 q = (p-(a+b)*0.5); + q = mat2(vec2(d.x,-d.y), vec2(d.y,d.x))*q; + q = abs(q)-vec2(l,th)*0.5; + return length(max(q,0.0)) + min(max(q.x,q.y),0.0); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// RotatedBox:6 + vec3 n_in6p1 = vec3(0.50000, 0.50000, 0.00000); + vec3 n_in6p2 = vec3(-0.25000, -0.25000, 0.00000); + vec3 n_in6p3 = vec3(0.25000, 0.25000, 0.00000); + float n_in6p4 = 0.20000; + float n_out6p0; + { + n_out6p0 = sdRotatedBox(UV.xy - n_in6p1.xy, n_in6p2.xy, n_in6p3.xy, n_in6p4); + } + +// Output:0 + ALBEDO = vec3(n_out6p0); + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -221, 79 ) +nodes/fragment/6/node = SubResource( 20 ) +nodes/fragment/6/position = Vector2( 40, 160 ) +nodes/fragment/connections = PoolIntArray( 6, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=9] +shader = SubResource( 19 ) + +[sub_resource type="VisualShaderNodeCustom" id=23] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, Vector3( 0.25, 0.25, 0 ) ] +initialized = true +script = ExtResource( 1 ) + +[sub_resource type="VisualShader" id=21] +code = "shader_type spatial; +render_mode specular_schlick_ggx, async_visible; + + + +// Rhombus + + float ndot(vec2 a, vec2 b ) { return a.x*b.x - a.y*b.y; } + float sdRhombus( in vec2 p, in vec2 b ) + { + p = abs(p); + float h = clamp( ndot(b-2.0*p,b)/dot(b,b), -1.0, 1.0 ); + float d = length( p-0.5*b*vec2(1.0-h,1.0+h) ); + return d * sign( p.x*b.y + p.y*b.x - b.x*b.y ); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Rhombus:2 + vec3 n_in2p1 = vec3(0.50000, 0.50000, 0.00000); + vec3 n_in2p2 = vec3(0.25000, 0.25000, 0.00000); + float n_out2p0; + { + n_out2p0 = sdRhombus(UV.xy - n_in2p1.xy, n_in2p2.xy); + } + +// Output:0 + ALBEDO = vec3(n_out2p0); + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -299, 55 ) +nodes/fragment/2/node = SubResource( 23 ) +nodes/fragment/2/position = Vector2( 40, 160 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=22] +shader = SubResource( 21 ) + +[sub_resource type="VisualShaderNodeCustom" id=26] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, 0.15, 3, 0.35, 4, 0.25 ] +initialized = true +script = ExtResource( 4 ) + +[sub_resource type="VisualShader" id=27] +code = "shader_type spatial; +render_mode specular_schlick_ggx, async_visible; + + + +// Trapezoid + + float sdTrapezoid( in vec2 p, in float r1, float r2, float he ) + { + vec2 k1 = vec2(r2,he); + vec2 k2 = vec2(r2-r1,2.0*he); + p.x = abs(p.x); + vec2 ca = vec2(p.x-min(p.x,(p.y<0.0)?r1:r2), abs(p.y)-he); + vec2 cb = p - k1 + k2*clamp( dot(k1-p,k2)/dot(k2, k2), 0.0, 1.0 ); + float s = (cb.x<0.0 && ca.y<0.0) ? -1.0 : 1.0; + return s*sqrt( min(dot(ca, ca),dot(cb, cb)) ); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Trapezoid:2 + vec3 n_in2p1 = vec3(0.50000, 0.50000, 0.00000); + float n_in2p2 = 0.15000; + float n_in2p3 = 0.35000; + float n_in2p4 = 0.25000; + float n_out2p0; + { + n_out2p0 = sdTrapezoid(UV.xy - n_in2p1.xy, n_in2p2, n_in2p3, n_in2p4); + } + +// Output:0 + ALBEDO = vec3(n_out2p0); + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -313, 99 ) +nodes/fragment/2/node = SubResource( 26 ) +nodes/fragment/2/position = Vector2( 60, 160 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=25] +shader = SubResource( 27 ) + +[sub_resource type="VisualShaderNodeCustom" id=28] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, 0.15, 3, 0.3, 4, 0.2 ] +initialized = true +script = ExtResource( 7 ) + +[sub_resource type="VisualShader" id=29] +code = "shader_type spatial; +render_mode specular_schlick_ggx, async_visible; + + + +// Parallelogram + + float sdParallelogram( in vec2 p, float wi, float he, float sk ) + { + vec2 e = vec2(sk,he); + p = (p.y<0.0)?-p:p; + vec2 w = p - e; w.x -= clamp(w.x,-wi,wi); + vec2 d = vec2(dot(w,w), -w.y); + float s = p.x*e.y - p.y*e.x; + p = (s<0.0)?-p:p; + vec2 v = p - vec2(wi,0); v -= e*clamp(dot(v,e)/dot(e,e),-1.0,1.0); + d = min( d, vec2(dot(v,v), wi*he-abs(s))); + return sqrt(d.x)*sign(-d.y); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Parallelogram:2 + vec3 n_in2p1 = vec3(0.50000, 0.50000, 0.00000); + float n_in2p2 = 0.15000; + float n_in2p3 = 0.30000; + float n_in2p4 = 0.20000; + float n_out2p0; + { + n_out2p0 = sdParallelogram(UV.xy - n_in2p1.xy, n_in2p2, n_in2p3, n_in2p4); + } + +// Output:0 + ALBEDO = vec3(n_out2p0); + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -402, 101 ) +nodes/fragment/2/node = SubResource( 28 ) +nodes/fragment/2/position = Vector2( 140, 180 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=30] +shader = SubResource( 29 ) + +[sub_resource type="VisualShaderNodeCustom" id=31] +default_input_values = [ 1, Vector3( 0.5, 0.25, 0 ), 2, Vector3( 0.25, 0.5, 0 ) ] +initialized = true +script = ExtResource( 3 ) + +[sub_resource type="VisualShader" id=32] +code = "shader_type spatial; +render_mode specular_schlick_ggx, async_visible; + + + +// Triangle + + float sdTriangleIsosceles( in vec2 p, in vec2 q ) + { + p.x = abs(p.x); + vec2 a = p - q*clamp( dot(p,q)/dot(q,q), 0.0, 1.0 ); + vec2 b = p - q*vec2( clamp( p.x/q.x, 0.0, 1.0 ), 1.0 ); + float s = -sign( q.y ); + vec2 d = min( vec2( dot(a,a), s*(p.x*q.y-p.y*q.x) ), + vec2( dot(b,b), s*(p.y-q.y) )); + return -sqrt(d.x)*sign(d.y); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Triangle:2 + vec3 n_in2p1 = vec3(0.50000, 0.25000, 0.00000); + vec3 n_in2p2 = vec3(0.25000, 0.50000, 0.00000); + float n_out2p0; + { + n_out2p0 = sdTriangleIsosceles(UV.xy - n_in2p1.xy, n_in2p2.xy); + } + +// Output:0 + ALBEDO = vec3(n_out2p0); + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -402, 101 ) +nodes/fragment/2/node = SubResource( 31 ) +nodes/fragment/2/position = Vector2( 120, 180 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=33] +shader = SubResource( 32 ) + +[sub_resource type="PlaneMesh" id=40] + +[sub_resource type="VisualShaderNodeCustom" id=47] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, 1, 3, 1 ] +initialized = true +script = ExtResource( 8 ) + +[sub_resource type="VisualShader" id=41] +code = "shader_type spatial; +render_mode specular_schlick_ggx, async_visible; + + + +// UVPolarCoord + + vec2 uv_polarcoord_spatial(vec2 __uv, vec2 __center, float __zoom, float __repeat) + { + vec2 __dir = __uv - __center; + float __radius = length(__dir) * 2.0; + float __angle = atan(__dir.y, __dir.x) * 1.0/(3.1415 * 2.0); + return vec2(__radius * __zoom, __angle * __repeat); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// UVPolarCoord:2 + vec3 n_in2p1 = vec3(0.50000, 0.50000, 0.00000); + float n_in2p2 = 1.00000; + float n_in2p3 = 1.00000; + vec3 n_out2p0; + { + n_out2p0.xy = uv_polarcoord_spatial(UV.xy, n_in2p1.xy, n_in2p2, n_in2p3); + } + +// Output:0 + ALBEDO = n_out2p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -491, 90 ) +nodes/fragment/2/node = SubResource( 47 ) +nodes/fragment/2/position = Vector2( 120, 180 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=42] +shader = SubResource( 41 ) + +[sub_resource type="PlaneMesh" id=43] + +[sub_resource type="VisualShaderNodeCustom" id=44] +default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, 10, 3, Vector3( 0, 0, 0 ) ] +initialized = true +script = ExtResource( 9 ) + +[sub_resource type="VisualShader" id=45] +code = "shader_type spatial; +render_mode specular_schlick_ggx, async_visible; + + + +// UVTwirl + + vec2 Twirl(vec2 __uv, vec2 __center, float __strength, vec2 __offset) + { + vec2 __delta = __uv - __center; + float __angle = __strength * length(__delta); + float __x = cos(__angle) * __delta.x - sin(__angle) * __delta.y; + float __y = sin(__angle) * __delta.x + cos(__angle) * __delta.y; + return vec2(__x + __center.x + __offset.x, __y + __center.y + __offset.y); + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// UVTwirl:2 + vec3 n_in2p1 = vec3(0.50000, 0.50000, 0.00000); + float n_in2p2 = 10.00000; + vec3 n_in2p3 = vec3(0.00000, 0.00000, 0.00000); + vec3 n_out2p0; + { + n_out2p0.xy = Twirl(UV.xy, n_in2p1.xy, n_in2p2, n_in2p3.xy); + } + +// Output:0 + ALBEDO = n_out2p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -491, 90 ) +nodes/fragment/2/node = SubResource( 44 ) +nodes/fragment/2/position = Vector2( 80, 180 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=46] +shader = SubResource( 45 ) + +[sub_resource type="VisualShaderNodeCustom" id=59] +default_input_values = [ 1, 1, 2, 1, 3, 0, 4, 1, 5, 0.3 ] +initialized = true +script = ExtResource( 10 ) + +[sub_resource type="VisualShaderNodeTexture" id=52] +texture = ExtResource( 12 ) +texture_type = 1 + +[sub_resource type="VisualShaderNodeScalarUniform" id=54] +uniform_name = "columns" +default_value_enabled = true +default_value = 24.0 + +[sub_resource type="VisualShaderNodeScalarUniform" id=55] +uniform_name = "rows" +default_value_enabled = true +default_value = 1.0 + +[sub_resource type="VisualShaderNodeScalarUniform" id=56] +uniform_name = "start_frame" +default_value_enabled = true + +[sub_resource type="VisualShaderNodeScalarUniform" id=57] +uniform_name = "end_frame" +default_value_enabled = true +default_value = 14.0 + +[sub_resource type="VisualShaderNodeScalarUniform" id=58] +uniform_name = "animation_speed" +default_value_enabled = true + +[sub_resource type="VisualShader" id=50] +code = "shader_type spatial; +render_mode specular_schlick_ggx, async_visible; + +uniform float columns = 24; +uniform float rows = 1; +uniform float start_frame = 0; +uniform float end_frame = 14; +uniform float animation_speed = 0; +uniform sampler2D tex_frg_3 : hint_albedo; + + +// UVFlipbook + + vec2 flipbook_anim(vec2 __uv, int __columns, int __rows, int __starting_frame, int __ending_frame, float __anim_speed) { + __starting_frame += int(fract(TIME * __anim_speed) * float(__ending_frame)); + float frame = float(clamp(__starting_frame, 0, __ending_frame)); + vec2 offPerFrame = vec2((1.0 / float(__columns)), (1.0 / float(__rows))); + + vec2 sprite_size = vec2(__uv.x / float(__columns), __uv.y / float(__rows)); + vec2 current_sprite = vec2(0.0, 1.0 - offPerFrame.y); + current_sprite.x += frame * offPerFrame.x; + float rowIndex; + current_sprite.y -= rowIndex * offPerFrame.y; + current_sprite.x -= rowIndex * float(__columns) * offPerFrame.x; + + vec2 sprite_uv = (sprite_size + current_sprite); + + return sprite_uv; + } + + +void vertex() { +// Output:0 + +} + +void fragment() { +// ScalarUniform:5 + float n_out5p0 = columns; + +// ScalarUniform:6 + float n_out6p0 = rows; + +// ScalarUniform:7 + float n_out7p0 = start_frame; + +// ScalarUniform:8 + float n_out8p0 = end_frame; + +// ScalarUniform:9 + float n_out9p0 = animation_speed; + +// UVFlipbook:10 + vec3 n_out10p0; + { + n_out10p0.xy = flipbook_anim(UV.xy, int(n_out5p0), int(n_out6p0), int(n_out7p0), int(n_out8p0), n_out9p0 ); + } + +// Texture:3 + vec4 tex_frg_3_read = texture(tex_frg_3, n_out10p0.xy); + vec3 n_out3p0 = tex_frg_3_read.rgb; + float n_out3p1 = tex_frg_3_read.a; + +// Output:0 + ALBEDO = n_out3p0; + ALPHA = n_out3p1; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -698.315, 77.4689 ) +nodes/fragment/3/node = SubResource( 52 ) +nodes/fragment/3/position = Vector2( 100, 140 ) +nodes/fragment/5/node = SubResource( 54 ) +nodes/fragment/5/position = Vector2( -560, 80 ) +nodes/fragment/6/node = SubResource( 55 ) +nodes/fragment/6/position = Vector2( -580, 240 ) +nodes/fragment/7/node = SubResource( 56 ) +nodes/fragment/7/position = Vector2( -580, 380 ) +nodes/fragment/8/node = SubResource( 57 ) +nodes/fragment/8/position = Vector2( -580, 500 ) +nodes/fragment/9/node = SubResource( 58 ) +nodes/fragment/9/position = Vector2( -580, 640 ) +nodes/fragment/10/node = SubResource( 59 ) +nodes/fragment/10/position = Vector2( -216.239, 178.197 ) +nodes/fragment/connections = PoolIntArray( 3, 0, 0, 0, 3, 1, 0, 1, 5, 0, 10, 1, 6, 0, 10, 2, 7, 0, 10, 3, 8, 0, 10, 4, 9, 0, 10, 5, 10, 0, 3, 0 ) + +[sub_resource type="ShaderMaterial" id=51] +shader = SubResource( 50 ) +shader_param/columns = 24 +shader_param/rows = 1 +shader_param/start_frame = 0.0 +shader_param/end_frame = 14.0 +shader_param/animation_speed = 0.377 + +[node name="examples3D" type="Spatial"] + +[node name="DirectionalLight" type="DirectionalLight" parent="."] +transform = Transform( 1, 0, 0, 0, 0.171482, 0.985187, 0, -0.985187, 0.171482, 0, 2.84318, 0 ) + +[node name="Shapes" type="Spatial" parent="."] + +[node name="Circle" type="MeshInstance" parent="Shapes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00569987, 0 ) +mesh = SubResource( 1 ) +skeleton = NodePath("../..") +material/0 = SubResource( 3 ) + +[node name="RoundedBox" type="MeshInstance" parent="Shapes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.21705, 0.0241101, 0 ) +mesh = SubResource( 1 ) +skeleton = NodePath("../..") +material/0 = SubResource( 5 ) + +[node name="Box" type="MeshInstance" parent="Shapes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.59847, 0.0241101, 0 ) +mesh = SubResource( 1 ) +skeleton = NodePath("../..") +material/0 = SubResource( 7 ) + +[node name="RotatedBox" type="MeshInstance" parent="Shapes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.17774, 0.0241101, 0 ) +mesh = SubResource( 1 ) +skeleton = NodePath("../..") +material/0 = SubResource( 9 ) + +[node name="Rhombus" type="MeshInstance" parent="Shapes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00569987, 2.46924 ) +mesh = SubResource( 1 ) +skeleton = NodePath("../..") +material/0 = SubResource( 22 ) + +[node name="Trapezoid" type="MeshInstance" parent="Shapes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.20994, 0.00569987, 2.46924 ) +mesh = SubResource( 1 ) +skeleton = NodePath("../..") +material/0 = SubResource( 25 ) + +[node name="Parallelogram" type="MeshInstance" parent="Shapes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.59188, 0.00569987, 2.46924 ) +mesh = SubResource( 1 ) +skeleton = NodePath("../..") +material/0 = SubResource( 30 ) + +[node name="Triangle" type="MeshInstance" parent="Shapes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.12483, 0.00569987, 2.46924 ) +mesh = SubResource( 1 ) +skeleton = NodePath("../..") +material/0 = SubResource( 33 ) + +[node name="UV" type="Spatial" parent="."] +visible = false + +[node name="PolarCoord" type="MeshInstance" parent="UV"] +mesh = SubResource( 40 ) +material/0 = SubResource( 42 ) + +[node name="Twirl" type="MeshInstance" parent="UV"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.2275, 0.0289924, 0 ) +mesh = SubResource( 43 ) +material/0 = SubResource( 46 ) + +[node name="Flipbook" type="MeshInstance" parent="UV"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.42791, 0.0289924, 0 ) +mesh = SubResource( 43 ) +material/0 = SubResource( 51 ) diff --git a/addons/VisualShaderExtras/BlendModes/Exclusion.gd b/addons/VisualShaderExtras/BlendModes/Exclusion.gd index a3573a8..37a2280 100644 --- a/addons/VisualShaderExtras/BlendModes/Exclusion.gd +++ b/addons/VisualShaderExtras/BlendModes/Exclusion.gd @@ -4,7 +4,7 @@ extends VisualShaderNodeCustom class_name VisualShaderNodeExclusion func _get_name(): - return "BlendColorDodge" + return "BlendExclusion" func _get_category(): return "VisualShaderExtras" diff --git a/addons/VisualShaderExtras/BlendModes/HardMix.gd b/addons/VisualShaderExtras/BlendModes/HardMix.gd index f0ee8ce..fd53593 100644 --- a/addons/VisualShaderExtras/BlendModes/HardMix.gd +++ b/addons/VisualShaderExtras/BlendModes/HardMix.gd @@ -4,7 +4,7 @@ extends VisualShaderNodeCustom class_name VisualShaderNodeHardMix func _get_name(): - return "BlendColorDodge" + return "BlendHardMix" func _get_category(): return "VisualShaderExtras" diff --git a/addons/VisualShaderExtras/BlendModes/LinearBurn.gd b/addons/VisualShaderExtras/BlendModes/LinearBurn.gd index 2986ade..c322b33 100644 --- a/addons/VisualShaderExtras/BlendModes/LinearBurn.gd +++ b/addons/VisualShaderExtras/BlendModes/LinearBurn.gd @@ -3,7 +3,7 @@ extends VisualShaderNodeCustom class_name VisualShaderNodeLinearBurn func _get_name(): - return "BlendColorDodge" + return "BlendLinearBurn" func _get_category(): return "VisualShaderExtras" diff --git a/addons/VisualShaderExtras/BlendModes/Luminosity.gd b/addons/VisualShaderExtras/BlendModes/Luminosity.gd index 6ae3d4e..e245fbb 100644 --- a/addons/VisualShaderExtras/BlendModes/Luminosity.gd +++ b/addons/VisualShaderExtras/BlendModes/Luminosity.gd @@ -3,7 +3,7 @@ extends VisualShaderNodeCustom class_name VisualShaderNodeLuminosity func _get_name(): - return "BlendColorDodge" + return "BlendLuminosity" func _get_category(): return "VisualShaderExtras" diff --git a/addons/VisualShaderExtras/BlendModes/PinLight.gd b/addons/VisualShaderExtras/BlendModes/PinLight.gd index 9b7501b..2547b1b 100644 --- a/addons/VisualShaderExtras/BlendModes/PinLight.gd +++ b/addons/VisualShaderExtras/BlendModes/PinLight.gd @@ -4,7 +4,7 @@ extends VisualShaderNodeCustom class_name VisualShaderNodePinLight func _get_name(): - return "BlendColorDodge" + return "BlendPinLight" func _get_category(): return "VisualShaderExtras" @@ -48,7 +48,7 @@ func _get_global_code(mode): return """ float pinLight( float s, float d ) { - return (2.0 * s - 1.0 > d) ? 2.0 * s - 1.0 : (s < 0.5 * d) ? 2.0 * s : d; + return (2.0 * s - 1.0 > d) ? 2.0 * s - 1.0 : ((s < 0.5 * d) ? 2.0 * s : d); } vec3 blend_pin_light( vec3 s, vec3 d ) diff --git a/addons/VisualShaderExtras/BlendModes/VividLight.gd b/addons/VisualShaderExtras/BlendModes/VividLight.gd index cd2b463..cf97e27 100644 --- a/addons/VisualShaderExtras/BlendModes/VividLight.gd +++ b/addons/VisualShaderExtras/BlendModes/VividLight.gd @@ -3,7 +3,7 @@ extends VisualShaderNodeCustom class_name VisualShaderNodeColorDodge func _get_name(): - return "BlendColorDodge" + return "BlendVividLight" func _get_category(): return "VisualShaderExtras" @@ -56,10 +56,10 @@ func _get_global_code(mode): } float blend_rgb_to_v(vec3 __col) { - float v = max(max(__col.r / 255.0, __col.g / 255.0), __col.b / 255.0); + return max(max(__col.r / 255.0, __col.g / 255.0), __col.b / 255.0); } - vec3 blend_vivid_light(vec3__top_col, vec3 __bot_col) { + vec3 blend_vivid_light(vec3 __top_col, vec3 __bot_col) { if (blend_rgb_to_v(__top_col) > 0.5) { return blend_color_dodge(__top_col, __bot_col); } else { diff --git a/addons/VisualShaderExtras/Shapes/Parallelogram.gd b/addons/VisualShaderExtras/Shapes/Parallelogram.gd new file mode 100644 index 0000000..b706bfa --- /dev/null +++ b/addons/VisualShaderExtras/Shapes/Parallelogram.gd @@ -0,0 +1,104 @@ +# The MIT License +# Copyright © 2022 Inigo Quilez +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +tool +extends VisualShaderNodeCustom +class_name VisualShaderNodeParallelogram + +func _init(): + set_input_port_default_value(1, Vector3(0.5, 0.5, 0.0)) + set_input_port_default_value(2, 0.15) + set_input_port_default_value(3, 0.3) + set_input_port_default_value(4, 0.2) + +func _get_name(): + return "Parallelogram" + +func _get_category(): + return "VisualShaderExtras" + +func _get_subcategory(): + return "Shapes" + +func _get_description(): + return "Signed Distance Parallelogram Shape" + +func _get_return_icon_type(): + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_input_port_count(): + return 5 + +func _get_input_port_name(port): + match port: + 0: + return "uv" + 1: + return "position" + 2: + return "width" + 3: + return "height" + 4: + return "skew" + +func _get_input_port_type(port): + match port: + 0: + return VisualShaderNode.PORT_TYPE_VECTOR + 1: + return VisualShaderNode.PORT_TYPE_VECTOR + 2: + return VisualShaderNode.PORT_TYPE_SCALAR + 3: + return VisualShaderNode.PORT_TYPE_SCALAR + 4: + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_output_port_count(): + return 1 + +func _get_output_port_name(port): + return "" + +func _get_output_port_type(port): + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_global_code(mode): + return """ + float sdParallelogram( in vec2 p, float wi, float he, float sk ) + { + vec2 e = vec2(sk,he); + p = (p.y<0.0)?-p:p; + vec2 w = p - e; w.x -= clamp(w.x,-wi,wi); + vec2 d = vec2(dot(w,w), -w.y); + float s = p.x*e.y - p.y*e.x; + p = (s<0.0)?-p:p; + vec2 v = p - vec2(wi,0); v -= e*clamp(dot(v,e)/dot(e,e),-1.0,1.0); + d = min( d, vec2(dot(v,v), wi*he-abs(s))); + return sqrt(d.x)*sign(-d.y); + } + """ + +func _get_code(input_vars, output_vars, mode, type): + var uv = "UV" + + if input_vars[0]: + uv = input_vars[0] + + return "%s = sdParallelogram(%s.xy - %s.xy, %s, %s, %s);" % [output_vars[0], uv, input_vars[1], input_vars[2], input_vars[3], input_vars[4]] diff --git a/addons/VisualShaderExtras/Shapes/Rhombus.gd b/addons/VisualShaderExtras/Shapes/Rhombus.gd new file mode 100644 index 0000000..1f84427 --- /dev/null +++ b/addons/VisualShaderExtras/Shapes/Rhombus.gd @@ -0,0 +1,90 @@ +# The MIT License +# Copyright © 2022 Inigo Quilez +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +tool +extends VisualShaderNodeCustom +class_name VisualShaderNodeRhombus + +func _init(): + set_input_port_default_value(1, Vector3(0.5, 0.5, 0.0)) + set_input_port_default_value(2, Vector3(0.25, 0.25, 0.0)) + +func _get_name(): + return "Rhombus" + +func _get_category(): + return "VisualShaderExtras" + +func _get_subcategory(): + return "Shapes" + +func _get_description(): + return "Signed Distance Rhombus Shape" + +func _get_return_icon_type(): + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_input_port_count(): + return 3 + +func _get_input_port_name(port): + match port: + 0: + return "uv" + 1: + return "position" + 2: + return "proportions" + +func _get_input_port_type(port): + match port: + 0: + return VisualShaderNode.PORT_TYPE_VECTOR + 1: + return VisualShaderNode.PORT_TYPE_VECTOR + 2: + return VisualShaderNode.PORT_TYPE_VECTOR + +func _get_output_port_count(): + return 1 + +func _get_output_port_name(port): + return "" + +func _get_output_port_type(port): + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_global_code(mode): + return """ + float ndot(vec2 a, vec2 b ) { return a.x*b.x - a.y*b.y; } + float sdRhombus( in vec2 p, in vec2 b ) + { + p = abs(p); + float h = clamp( ndot(b-2.0*p,b)/dot(b,b), -1.0, 1.0 ); + float d = length( p-0.5*b*vec2(1.0-h,1.0+h) ); + return d * sign( p.x*b.y + p.y*b.x - b.x*b.y ); + } + """ + +func _get_code(input_vars, output_vars, mode, type): + var uv = "UV" + + if input_vars[0]: + uv = input_vars[0] + + return "%s = sdRhombus(%s.xy - %s.xy, %s.xy);" % [output_vars[0], uv, input_vars[1], input_vars[2]] diff --git a/addons/VisualShaderExtras/Shapes/RotatedBox.gd b/addons/VisualShaderExtras/Shapes/RotatedBox.gd new file mode 100644 index 0000000..fd44884 --- /dev/null +++ b/addons/VisualShaderExtras/Shapes/RotatedBox.gd @@ -0,0 +1,101 @@ +# The MIT License +# Copyright © 2022 Inigo Quilez +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +tool +extends VisualShaderNodeCustom +class_name VisualShaderNodeRotatedBox + +func _init(): + set_input_port_default_value(1, Vector3(0.5, 0.5, 0.0)) + set_input_port_default_value(2, Vector3(-0.25, -0.25, 0.0)) + set_input_port_default_value(3, Vector3(0.25, 0.25, 0.0)) + set_input_port_default_value(4, 0.2) + +func _get_name(): + return "RotatedBox" + +func _get_category(): + return "VisualShaderExtras" + +func _get_subcategory(): + return "Shapes" + +func _get_description(): + return "Signed Distance Rotated Box Shape" + +func _get_return_icon_type(): + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_input_port_count(): + return 5 + +func _get_input_port_name(port): + match port: + 0: + return "uv" + 1: + return "position" + 2: + return "point A" + 3: + return "point B" + 4: + return "thickness" + +func _get_input_port_type(port): + match port: + 0: + return VisualShaderNode.PORT_TYPE_VECTOR + 1: + return VisualShaderNode.PORT_TYPE_VECTOR + 2: + return VisualShaderNode.PORT_TYPE_VECTOR + 3: + return VisualShaderNode.PORT_TYPE_VECTOR + 4: + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_output_port_count(): + return 1 + +func _get_output_port_name(port): + return "" + +func _get_output_port_type(port): + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_global_code(mode): + return """ + float sdRotatedBox( in vec2 p, in vec2 a, in vec2 b, float th ) + { + float l = length(b-a); + vec2 d = (b-a)/l; + vec2 q = (p-(a+b)*0.5); + q = mat2(vec2(d.x,-d.y), vec2(d.y,d.x))*q; + q = abs(q)-vec2(l,th)*0.5; + return length(max(q,0.0)) + min(max(q.x,q.y),0.0); + } + """ + +func _get_code(input_vars, output_vars, mode, type): + var uv = "UV" + + if input_vars[0]: + uv = input_vars[0] + + return "%s = sdRotatedBox(%s.xy - %s.xy, %s.xy, %s.xy, %s);" % [output_vars[0], uv, input_vars[1], input_vars[2], input_vars[3], input_vars[4]] diff --git a/addons/VisualShaderExtras/Shapes/Trapezoid.gd b/addons/VisualShaderExtras/Shapes/Trapezoid.gd new file mode 100644 index 0000000..1d471b6 --- /dev/null +++ b/addons/VisualShaderExtras/Shapes/Trapezoid.gd @@ -0,0 +1,102 @@ +# The MIT License +# Copyright © 2022 Inigo Quilez +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +tool +extends VisualShaderNodeCustom +class_name VisualShaderNodeTrapezoid + +func _init(): + set_input_port_default_value(1, Vector3(0.5, 0.5, 0.0)) + set_input_port_default_value(2, 0.15) + set_input_port_default_value(3, 0.35) + set_input_port_default_value(4, 0.25) + +func _get_name(): + return "Trapezoid" + +func _get_category(): + return "VisualShaderExtras" + +func _get_subcategory(): + return "Shapes" + +func _get_description(): + return "Signed Distance Trapezoid Shape" + +func _get_return_icon_type(): + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_input_port_count(): + return 5 + +func _get_input_port_name(port): + match port: + 0: + return "uv" + 1: + return "position" + 2: + return "upper width" + 3: + return "lower width" + 4: + return "height" + +func _get_input_port_type(port): + match port: + 0: + return VisualShaderNode.PORT_TYPE_VECTOR + 1: + return VisualShaderNode.PORT_TYPE_VECTOR + 2: + return VisualShaderNode.PORT_TYPE_SCALAR + 3: + return VisualShaderNode.PORT_TYPE_SCALAR + 4: + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_output_port_count(): + return 1 + +func _get_output_port_name(port): + return "" + +func _get_output_port_type(port): + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_global_code(mode): + return """ + float sdTrapezoid( in vec2 p, in float r1, float r2, float he ) + { + vec2 k1 = vec2(r2,he); + vec2 k2 = vec2(r2-r1,2.0*he); + p.x = abs(p.x); + vec2 ca = vec2(p.x-min(p.x,(p.y<0.0)?r1:r2), abs(p.y)-he); + vec2 cb = p - k1 + k2*clamp( dot(k1-p,k2)/dot(k2, k2), 0.0, 1.0 ); + float s = (cb.x<0.0 && ca.y<0.0) ? -1.0 : 1.0; + return s*sqrt( min(dot(ca, ca),dot(cb, cb)) ); + } + """ + +func _get_code(input_vars, output_vars, mode, type): + var uv = "UV" + + if input_vars[0]: + uv = input_vars[0] + + return "%s = sdTrapezoid(%s.xy - %s.xy, %s, %s, %s);" % [output_vars[0], uv, input_vars[1], input_vars[2], input_vars[3], input_vars[4]] diff --git a/addons/VisualShaderExtras/Shapes/Triangle.gd b/addons/VisualShaderExtras/Shapes/Triangle.gd new file mode 100644 index 0000000..0612c10 --- /dev/null +++ b/addons/VisualShaderExtras/Shapes/Triangle.gd @@ -0,0 +1,92 @@ +# The MIT License +# Copyright © 2022 Inigo Quilez +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +tool +extends VisualShaderNodeCustom +class_name VisualShaderNodeTriangle + +func _init(): + set_input_port_default_value(1, Vector3(0.5, 0.25, 0.0)) + set_input_port_default_value(2, Vector3(0.25, 0.5, 0.0)) + +func _get_name(): + return "Triangle" + +func _get_category(): + return "VisualShaderExtras" + +func _get_subcategory(): + return "Shapes" + +func _get_description(): + return "Signed Distance Triangle Shape" + +func _get_return_icon_type(): + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_input_port_count(): + return 3 + +func _get_input_port_name(port): + match port: + 0: + return "uv" + 1: + return "position" + 2: + return "proportions" + +func _get_input_port_type(port): + match port: + 0: + return VisualShaderNode.PORT_TYPE_VECTOR + 1: + return VisualShaderNode.PORT_TYPE_VECTOR + 2: + return VisualShaderNode.PORT_TYPE_VECTOR + +func _get_output_port_count(): + return 1 + +func _get_output_port_name(port): + return "" + +func _get_output_port_type(port): + return VisualShaderNode.PORT_TYPE_SCALAR + +func _get_global_code(mode): + return """ + float sdTriangleIsosceles( in vec2 p, in vec2 q ) + { + p.x = abs(p.x); + vec2 a = p - q*clamp( dot(p,q)/dot(q,q), 0.0, 1.0 ); + vec2 b = p - q*vec2( clamp( p.x/q.x, 0.0, 1.0 ), 1.0 ); + float s = -sign( q.y ); + vec2 d = min( vec2( dot(a,a), s*(p.x*q.y-p.y*q.x) ), + vec2( dot(b,b), s*(p.y-q.y) )); + return -sqrt(d.x)*sign(d.y); + } + """ + +func _get_code(input_vars, output_vars, mode, type): + var uv = "UV" + + if input_vars[0]: + uv = input_vars[0] + + return "%s = sdTriangleIsosceles(%s.xy - %s.xy, %s.xy);" % [output_vars[0], uv, input_vars[1], input_vars[2]] diff --git a/addons/VisualShaderExtras/UV/UVFlipbook.gd b/addons/VisualShaderExtras/UV/UVFlipbook.gd new file mode 100644 index 0000000..a571315 --- /dev/null +++ b/addons/VisualShaderExtras/UV/UVFlipbook.gd @@ -0,0 +1,120 @@ +# from https://github.com/thnewlands/unity-surfaceshader-flipbook +# +# MIT License +# +# Copyright (c) 2017 Thomas Newlands +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +tool +extends VisualShaderNodeCustom +class_name VisualShaderNodeUVFlipbook + +func _init(): + set_input_port_default_value(1, 1) + set_input_port_default_value(2, 1) + set_input_port_default_value(3, 0) + set_input_port_default_value(4, 1) + set_input_port_default_value(5, 0.3) + +func _get_name(): + return "UVFlipbook" + +func _get_category(): + return "VisualShaderExtras" + +func _get_subcategory(): + return "UV" + +func _get_description(): + return "UV Flipbook Animation" + +func _get_return_icon_type(): + return VisualShaderNode.PORT_TYPE_VECTOR + +func _get_input_port_count(): + return 6 + +func _get_input_port_name(port): + match port: + 0: + return "uv" + 1: + return "columns" + 2: + return "rows" + 3: + return "starting frame" + 4: + return "ending frame" + 5: + return "animation speed" + +func _get_input_port_type(port): + match port: + 0: + return VisualShaderNode.PORT_TYPE_VECTOR + 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(): + return 1 + +func _get_output_port_name(port): + return "" + +func _get_output_port_type(port): + return VisualShaderNode.PORT_TYPE_VECTOR + +func _get_global_code(mode): + return """ + vec2 flipbook_anim(vec2 __uv, int __columns, int __rows, int __starting_frame, int __ending_frame, float __anim_speed) { + __starting_frame += int(fract(TIME * __anim_speed) * float(__ending_frame)); + float frame = float(clamp(__starting_frame, 0, __ending_frame)); + vec2 offPerFrame = vec2((1.0 / float(__columns)), (1.0 / float(__rows))); + + vec2 sprite_size = vec2(__uv.x / float(__columns), __uv.y / float(__rows)); + vec2 current_sprite = vec2(0.0, 1.0 - offPerFrame.y); + current_sprite.x += frame * offPerFrame.x; + float rowIndex; + current_sprite.y -= rowIndex * offPerFrame.y; + current_sprite.x -= rowIndex * float(__columns) * offPerFrame.x; + + vec2 sprite_uv = (sprite_size + current_sprite); + + return sprite_uv; + } + """ + +func _get_code(input_vars, output_vars, mode, type): + var uv = "UV" + + if input_vars[0]: + uv = input_vars[0] + + return "%s.xy = flipbook_anim(%s.xy, int(%s), int(%s), int(%s), int(%s), %s );" % [output_vars[0], uv, input_vars[1], input_vars[2], input_vars[3], input_vars[4], input_vars[5]] + diff --git a/addons/VisualShaderExtras/UV/UVPolarCoord.gd b/addons/VisualShaderExtras/UV/UVPolarCoord.gd index fdea946..5aa4e92 100644 --- a/addons/VisualShaderExtras/UV/UVPolarCoord.gd +++ b/addons/VisualShaderExtras/UV/UVPolarCoord.gd @@ -30,7 +30,7 @@ func _get_input_port_name(port): 0: return "uv" 1: - return "scale" + return "center" 2: return "zoom strength" 3: @@ -57,7 +57,7 @@ func _get_output_port_type(port): return VisualShaderNode.PORT_TYPE_VECTOR func _get_global_code(mode): - if (mode == Shader.MODE_CANVAS_ITEM): + if (mode == Shader.MODE_SPATIAL): return """ vec2 uv_polarcoord_spatial(vec2 __uv, vec2 __center, float __zoom, float __repeat) { diff --git a/default_env.tres b/default_env.tres new file mode 100644 index 0000000..20207a4 --- /dev/null +++ b/default_env.tres @@ -0,0 +1,7 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="ProceduralSky" id=1] + +[resource] +background_mode = 2 +background_sky = SubResource( 1 ) diff --git a/examples2D.tscn b/examples2D.tscn deleted file mode 100644 index 7d2881d..0000000 --- a/examples2D.tscn +++ /dev/null @@ -1,552 +0,0 @@ -[gd_scene load_steps=28 format=2] - -[ext_resource path="res://icon.png" type="Texture" id=1] -[ext_resource path="res://addons/VisualShaderExtras/UV/UVTwirl.gd" type="Script" id=2] - -[sub_resource type="Shader" id=5] -code = "shader_type canvas_item; - -uniform vec4 top_col : hint_color; -uniform vec4 bot_col : hint_color; -uniform sampler2D noise; - -vec3 blend_color_dodge(vec3 __top_col, vec3 __bot_col) -{ - return __bot_col / (1.0 - __top_col.rgb); -} - -void fragment() { - COLOR.rgb = blend_color_dodge(top_col.rgb, bot_col.rgb * texture(noise, UV).r); -}" - -[sub_resource type="OpenSimplexNoise" id=2] - -[sub_resource type="NoiseTexture" id=3] -noise = SubResource( 2 ) - -[sub_resource type="ShaderMaterial" id=4] -shader = SubResource( 5 ) -shader_param/top_col = Color( 0.380392, 0.207843, 0.631373, 1 ) -shader_param/bot_col = Color( 0.219608, 0.72549, 0.290196, 1 ) -shader_param/noise = SubResource( 3 ) - -[sub_resource type="Shader" id=8] -code = "shader_type canvas_item; - -uniform vec4 top_col : hint_color; -uniform vec4 bot_col : hint_color; -uniform sampler2D noise; - -vec3 blend_gamma_illumination(vec3 __top_col, vec3 __bot_col) -{ - return (1.0 - pow(__bot_col, (1.0 / __top_col))); -} - -void fragment() { - COLOR.rgb = blend_gamma_illumination(top_col.rgb, bot_col.rgb * texture(noise, UV).r); -}" - -[sub_resource type="ShaderMaterial" id=9] -shader = SubResource( 8 ) -shader_param/top_col = Color( 0.670588, 0.815686, 0.572549, 1 ) -shader_param/bot_col = Color( 0.556863, 0.584314, 0.694118, 1 ) -shader_param/noise = SubResource( 3 ) - -[sub_resource type="Shader" id=10] -code = "shader_type canvas_item; - -uniform vec4 top_col : hint_color; -uniform vec4 bot_col : hint_color; -uniform sampler2D noise; - -vec3 blend_gamma_light(vec3 __top_col, vec3 __bot_col) -{ - return pow(__bot_col, __top_col); -} - -void fragment() { - COLOR.rgb = blend_gamma_light(top_col.rgb, bot_col.rgb * texture(noise, UV).r); -}" - -[sub_resource type="ShaderMaterial" id=11] -shader = SubResource( 10 ) -shader_param/top_col = Color( 0.52549, 0.211765, 0.380392, 1 ) -shader_param/bot_col = Color( 0.34902, 0.278431, 0.537255, 1 ) -shader_param/noise = SubResource( 3 ) - -[sub_resource type="Shader" id=12] -code = "shader_type canvas_item; - -uniform vec4 top_col : hint_color; -uniform vec4 bot_col : hint_color; -uniform sampler2D noise; - -vec3 blend_linear_light(vec3 __top_col, vec3 __bot_col) -{ - return (__bot_col + 2.0 * __top_col) - 1.0; -} - -void fragment() { - COLOR.rgb = blend_linear_light(top_col.rgb, bot_col.rgb * texture(noise, UV).r); -}" - -[sub_resource type="ShaderMaterial" id=13] -shader = SubResource( 12 ) -shader_param/top_col = Color( 0.705882, 0.764706, 0.360784, 1 ) -shader_param/bot_col = Color( 0.670588, 0.164706, 0.00784314, 1 ) -shader_param/noise = SubResource( 3 ) - -[sub_resource type="Shader" id=6] -code = "shader_type canvas_item; - -uniform vec4 top_col : hint_color; -uniform vec4 bot_col : hint_color; -uniform sampler2D noise; - -vec3 blend_gamma_dark(vec3 __top_col, vec3 __bot_col) -{ - return pow(__bot_col, (1.0 / __top_col)); -} - -void fragment() { - COLOR.rgb = blend_gamma_dark(top_col.rgb, bot_col.rgb * texture(noise, UV).r); -}" - -[sub_resource type="ShaderMaterial" id=7] -shader = SubResource( 6 ) -shader_param/top_col = Color( 0.435294, 0.792157, 0.188235, 1 ) -shader_param/bot_col = Color( 0.666667, 0.180392, 0.180392, 1 ) -shader_param/noise = SubResource( 3 ) - -[sub_resource type="Shader" id=14] -code = "shader_type canvas_item; - -uniform vec2 position = vec2(0.5); -uniform float radius = 0.5; - -uniform vec4 color : hint_color; - -float sdCircle(vec2 pos, float r) { - return length(pos) - r; -} - -void fragment() { - float circle = sdCircle(UV - position, radius); - - COLOR = mix(color.rgba, vec4(0.0), step(0.0, circle)); -}" - -[sub_resource type="ShaderMaterial" id=15] -shader = SubResource( 14 ) -shader_param/position = Vector2( 0.554, 0.5 ) -shader_param/radius = 0.25 -shader_param/color = Color( 0.168627, 0.623529, 0.443137, 1 ) - -[sub_resource type="Shader" id=18] -code = "shader_type canvas_item; - -uniform vec2 position = vec2(0.5); -uniform vec2 proportions = vec2(0.25); - -uniform vec4 color : hint_color; - -float sdBox( in vec2 p, in vec2 b ) -{ - vec2 d = abs(p)-b; - return length(max(d,0.0)) + min(max(d.x,d.y),0.0); -} - -void fragment() { - float box = sdBox(UV - position, proportions); - COLOR = mix(color.rgba, vec4(0.0), step(0.0, box)); -}" - -[sub_resource type="ShaderMaterial" id=19] -shader = SubResource( 18 ) -shader_param/position = Vector2( 0.5, 0.5 ) -shader_param/proportions = Vector2( 0.25, 0.25 ) -shader_param/color = Color( 0.168627, 0.623529, 0.442279, 1 ) - -[sub_resource type="Shader" id=16] -code = "shader_type canvas_item; - -uniform vec2 position = vec2(0.5); -uniform vec2 proportions = vec2(0.5); -uniform vec4 radius = vec4(0.5); - -uniform vec4 color : hint_color; - -float sdRoundedBox( vec2 p, vec2 b, vec4 r ) -{ - r.xy = (p.x>0.0)?r.xy : r.zw; - r.x = (p.y>0.0)?r.x : r.y; - vec2 q = abs(p)-b+r.x; - return min(max(q.x,q.y),0.0) + length(max(q,0.0)) - r.x; -} - -void fragment() { - float box = sdRoundedBox(UV - position, proportions, radius); - COLOR = mix(color.rgba, vec4(0.0), step(0.0, box)); -}" - -[sub_resource type="ShaderMaterial" id=17] -shader = SubResource( 16 ) -shader_param/position = Vector2( 0.5, 0.5 ) -shader_param/proportions = Vector2( 0.25, 0.25 ) -shader_param/radius = Plane( 0.201, 0, 0, 0.253 ) -shader_param/color = Color( 0.168627, 0.623529, 0.442279, 1 ) - -[sub_resource type="VisualShaderNodeCustom" id=20] -default_input_values = [ 1, Vector3( 0.5, 0.5, 0 ), 2, 10, 3, Vector3( 0, 0, 0 ) ] -initialized = true -script = ExtResource( 2 ) - -[sub_resource type="VisualShaderNodeInput" id=21] -input_name = "uv" - -[sub_resource type="VisualShaderNodeVec3Uniform" id=22] -uniform_name = "VectorUniform" -default_value_enabled = true -default_value = Vector3( 0.5, 0.5, 0 ) - -[sub_resource type="VisualShaderNodeScalarUniform" id=23] -uniform_name = "ScalarUniform" -default_value_enabled = true -default_value = 10.0 - -[sub_resource type="VisualShaderNodeVec3Uniform" id=24] -uniform_name = "VectorUniform2" -default_value_enabled = true - -[sub_resource type="VisualShader" id=25] -code = "shader_type canvas_item; -uniform vec3 VectorUniform = vec3(0.500000, 0.500000, 0.000000); -uniform float ScalarUniform = 10; -uniform vec3 VectorUniform2 = vec3(0.000000, 0.000000, 0.000000); - - -// UVTwirl - - vec2 Twirl(vec2 __uv, vec2 __center, float __strength, vec2 __offset) - { - vec2 __delta = __uv - __center; - float __angle = __strength * length(__delta); - float __x = cos(__angle) * __delta.x - sin(__angle) * __delta.y; - float __y = sin(__angle) * __delta.x + cos(__angle) * __delta.y; - return vec2(__x + __center.x + __offset.x, __y + __center.y + __offset.y); - } - - -void vertex() { -// Output:0 - -} - -void fragment() { -// VectorUniform:4 - vec3 n_out4p0 = VectorUniform; - -// ScalarUniform:5 - float n_out5p0 = ScalarUniform; - -// VectorUniform:6 - vec3 n_out6p0 = VectorUniform2; - -// UVTwirl:2 - vec3 n_out2p0; - { - n_out2p0.xy = Twirl(UV.xy, n_out4p0.xy, n_out5p0, n_out6p0.xy); - } - -// Output:0 - COLOR.rgb = n_out2p0; - -} - -void light() { -// Output:0 - -} -" -graph_offset = Vector2( -407.76, 93.8799 ) -mode = 1 -flags/light_only = false -nodes/fragment/0/position = Vector2( 520, 140 ) -nodes/fragment/2/node = SubResource( 20 ) -nodes/fragment/2/position = Vector2( 120, 80 ) -nodes/fragment/3/node = SubResource( 21 ) -nodes/fragment/3/position = Vector2( 180, 260 ) -nodes/fragment/4/node = SubResource( 22 ) -nodes/fragment/4/position = Vector2( -360, 60 ) -nodes/fragment/5/node = SubResource( 23 ) -nodes/fragment/5/position = Vector2( -380, 180 ) -nodes/fragment/6/node = SubResource( 24 ) -nodes/fragment/6/position = Vector2( -340, 280 ) -nodes/fragment/connections = PoolIntArray( 4, 0, 2, 1, 5, 0, 2, 2, 6, 0, 2, 3, 2, 0, 0, 0 ) - -[sub_resource type="ShaderMaterial" id=26] -shader = SubResource( 25 ) -shader_param/VectorUniform = Vector3( 0.532, 0.5, 0 ) -shader_param/ScalarUniform = 10.0 -shader_param/VectorUniform2 = Vector3( 0, 0, 0 ) - -[node name="Examples" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 - -[node name="BlendModes" type="Control" parent="."] -visible = false -anchor_right = 1.0 -anchor_bottom = 1.0 - -[node name="VBoxContainer" type="VBoxContainer" parent="BlendModes"] -anchor_right = 1.0 -anchor_bottom = 1.0 - -[node name="Lighten" type="VBoxContainer" parent="BlendModes/VBoxContainer"] -margin_right = 1024.0 -margin_bottom = 298.0 -size_flags_vertical = 3 - -[node name="LightenLabel" type="Label" parent="BlendModes/VBoxContainer/Lighten"] -margin_right = 1024.0 -margin_bottom = 14.0 -text = "Lighten" -align = 1 - -[node name="HBoxContainer" type="HBoxContainer" parent="BlendModes/VBoxContainer/Lighten"] -margin_top = 18.0 -margin_right = 1024.0 -margin_bottom = 153.0 - -[node name="ColorDodgePreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer"] -margin_right = 100.0 -margin_bottom = 135.0 -rect_min_size = Vector2( 100, 100 ) - -[node name="ColorDodge" type="TextureRect" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer/ColorDodgePreview"] -material = SubResource( 4 ) -margin_right = 100.0 -margin_bottom = 100.0 -rect_min_size = Vector2( 100, 100 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Label" type="Label" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer/ColorDodgePreview"] -margin_top = 112.0 -margin_right = 100.0 -margin_bottom = 126.0 -size_flags_vertical = 6 -text = "Color Dodge" -align = 1 - -[node name="GammaIlluminationPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer"] -margin_left = 104.0 -margin_right = 204.0 -margin_bottom = 135.0 -rect_min_size = Vector2( 100, 100 ) - -[node name="GammaIllumination" type="TextureRect" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer/GammaIlluminationPreview"] -material = SubResource( 9 ) -margin_right = 100.0 -margin_bottom = 100.0 -rect_min_size = Vector2( 100, 100 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Label" type="Label" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer/GammaIlluminationPreview"] -margin_top = 104.0 -margin_right = 100.0 -margin_bottom = 135.0 -size_flags_vertical = 6 -text = "Gamma Illumination" -align = 1 -valign = 1 -autowrap = true - -[node name="GammaLightPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer"] -margin_left = 208.0 -margin_right = 308.0 -margin_bottom = 135.0 -rect_min_size = Vector2( 100, 100 ) - -[node name="GammaLight" type="TextureRect" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer/GammaLightPreview"] -material = SubResource( 11 ) -margin_right = 100.0 -margin_bottom = 100.0 -rect_min_size = Vector2( 100, 100 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Label" type="Label" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer/GammaLightPreview"] -margin_top = 112.0 -margin_right = 100.0 -margin_bottom = 126.0 -size_flags_vertical = 6 -text = "Gamma Light" -align = 1 -valign = 1 -autowrap = true - -[node name="LinearLightPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer"] -margin_left = 312.0 -margin_right = 412.0 -margin_bottom = 135.0 -rect_min_size = Vector2( 100, 100 ) - -[node name="LinearLight" type="TextureRect" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer/LinearLightPreview"] -material = SubResource( 13 ) -margin_right = 100.0 -margin_bottom = 100.0 -rect_min_size = Vector2( 100, 100 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Label" type="Label" parent="BlendModes/VBoxContainer/Lighten/HBoxContainer/LinearLightPreview"] -margin_top = 112.0 -margin_right = 100.0 -margin_bottom = 126.0 -size_flags_vertical = 6 -text = "Linear Light" -align = 1 -valign = 1 -autowrap = true - -[node name="Darken" type="VBoxContainer" parent="BlendModes/VBoxContainer"] -margin_top = 302.0 -margin_right = 1024.0 -margin_bottom = 600.0 -size_flags_vertical = 3 - -[node name="DarkenLabel" type="Label" parent="BlendModes/VBoxContainer/Darken"] -margin_right = 1024.0 -margin_bottom = 14.0 -text = "Darken" -align = 1 - -[node name="HBoxContainer" type="HBoxContainer" parent="BlendModes/VBoxContainer/Darken"] -margin_top = 18.0 -margin_right = 1024.0 -margin_bottom = 136.0 - -[node name="GammaDarkPreview" type="VBoxContainer" parent="BlendModes/VBoxContainer/Darken/HBoxContainer"] -margin_right = 100.0 -margin_bottom = 118.0 -rect_min_size = Vector2( 100, 100 ) - -[node name="GammaDark" type="TextureRect" parent="BlendModes/VBoxContainer/Darken/HBoxContainer/GammaDarkPreview"] -material = SubResource( 7 ) -margin_right = 100.0 -margin_bottom = 100.0 -rect_min_size = Vector2( 100, 100 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Label" type="Label" parent="BlendModes/VBoxContainer/Darken/HBoxContainer/GammaDarkPreview"] -margin_top = 104.0 -margin_right = 100.0 -margin_bottom = 118.0 -size_flags_vertical = 6 -text = "Gamma Dark" -align = 1 - -[node name="Shapes" type="Control" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 - -[node name="VBoxContainer" type="VBoxContainer" parent="Shapes"] -anchor_right = 1.0 -anchor_bottom = 1.0 - -[node name="Normal" type="VBoxContainer" parent="Shapes/VBoxContainer"] -margin_right = 1024.0 -margin_bottom = 298.0 -size_flags_vertical = 3 - -[node name="Label" type="Label" parent="Shapes/VBoxContainer/Normal"] -margin_right = 1024.0 -margin_bottom = 14.0 -text = "Normal" -align = 1 - -[node name="HBoxContainer" type="HBoxContainer" parent="Shapes/VBoxContainer/Normal"] -margin_top = 18.0 -margin_right = 1024.0 -margin_bottom = 136.0 - -[node name="Circle" type="VBoxContainer" parent="Shapes/VBoxContainer/Normal/HBoxContainer"] -margin_right = 100.0 -margin_bottom = 118.0 - -[node name="ColorRect" type="ColorRect" parent="Shapes/VBoxContainer/Normal/HBoxContainer/Circle"] -material = SubResource( 15 ) -margin_right = 100.0 -margin_bottom = 100.0 -rect_min_size = Vector2( 100, 100 ) -size_flags_vertical = 3 - -[node name="Label" type="Label" parent="Shapes/VBoxContainer/Normal/HBoxContainer/Circle"] -margin_top = 104.0 -margin_right = 100.0 -margin_bottom = 118.0 -text = "Circle" -align = 1 - -[node name="Box" type="VBoxContainer" parent="Shapes/VBoxContainer/Normal/HBoxContainer"] -margin_left = 104.0 -margin_right = 204.0 -margin_bottom = 118.0 - -[node name="ColorRect" type="ColorRect" parent="Shapes/VBoxContainer/Normal/HBoxContainer/Box"] -material = SubResource( 19 ) -margin_right = 100.0 -margin_bottom = 100.0 -rect_min_size = Vector2( 100, 100 ) -size_flags_vertical = 3 - -[node name="Label" type="Label" parent="Shapes/VBoxContainer/Normal/HBoxContainer/Box"] -margin_top = 104.0 -margin_right = 100.0 -margin_bottom = 118.0 -text = "Box" -align = 1 - -[node name="Rounded" type="VBoxContainer" parent="Shapes/VBoxContainer"] -margin_top = 302.0 -margin_right = 1024.0 -margin_bottom = 600.0 -size_flags_vertical = 3 - -[node name="Label" type="Label" parent="Shapes/VBoxContainer/Rounded"] -margin_right = 1024.0 -margin_bottom = 14.0 -text = "Rounded" -align = 1 - -[node name="HBoxContainer" type="HBoxContainer" parent="Shapes/VBoxContainer/Rounded"] -margin_top = 18.0 -margin_right = 1024.0 -margin_bottom = 136.0 - -[node name="RoundedBox" type="VBoxContainer" parent="Shapes/VBoxContainer/Rounded/HBoxContainer"] -margin_right = 100.0 -margin_bottom = 118.0 - -[node name="ColorRect" type="ColorRect" parent="Shapes/VBoxContainer/Rounded/HBoxContainer/RoundedBox"] -material = SubResource( 17 ) -margin_right = 100.0 -margin_bottom = 100.0 -rect_min_size = Vector2( 100, 100 ) -size_flags_vertical = 3 - -[node name="Label" type="Label" parent="Shapes/VBoxContainer/Rounded/HBoxContainer/RoundedBox"] -margin_top = 104.0 -margin_right = 100.0 -margin_bottom = 118.0 -text = "Rounded Box" -align = 1 - -[node name="ColorRect" type="ColorRect" parent="."] -material = SubResource( 26 ) -margin_right = 338.0 -margin_bottom = 310.0 diff --git a/examples3D.tscn b/examples3D.tscn deleted file mode 100644 index a80f0ed..0000000 --- a/examples3D.tscn +++ /dev/null @@ -1,292 +0,0 @@ -[gd_scene load_steps=18 format=2] - -[sub_resource type="PlaneMesh" id=1] - -[sub_resource type="Shader" id=2] -code = "shader_type spatial; - -uniform vec2 position = vec2(0.5); -uniform float radius = 0.5; - -uniform vec4 color : hint_color; - -float sdCircle(vec2 pos, float r) { - return length(pos) - r; -} - -void fragment() { - float circle = sdCircle(UV - position, radius); - // TODO: correct way for sharp edges! - ALBEDO = mix(color.rgb, vec3(0.0), step(0.0, circle)); -}" - -[sub_resource type="ShaderMaterial" id=3] -shader = SubResource( 2 ) -shader_param/position = Vector2( 0.5, 0.5 ) -shader_param/radius = 0.243 -shader_param/color = Color( 0.658824, 0.247059, 0.490196, 1 ) - -[sub_resource type="Shader" id=4] -code = "shader_type spatial; - -uniform vec2 position = vec2(0.5); -uniform vec2 proportions = vec2(0.5); -uniform vec4 radius = vec4(0.5); - -uniform vec4 color : hint_color; - -float sdRoundedBox( in vec2 p, in vec2 b, in vec4 r ) -{ - r.xy = (p.x>0.0)?r.xy : r.zw; - r.x = (p.y>0.0)?r.x : r.y; - vec2 q = abs(p)-b+r.x; - return min(max(q.x,q.y),0.0) + length(max(q,0.0)) - r.x; -} - -void fragment() { - float box = sdRoundedBox(UV - position, proportions, radius); - - ALBEDO = mix(color.rgb, vec3(0.0), step(0.0, box)); -}" - -[sub_resource type="ShaderMaterial" id=5] -shader = SubResource( 4 ) -shader_param/position = Vector2( 0.5, 0.5 ) -shader_param/proportions = Vector2( 0.248, 0.336 ) -shader_param/radius = Plane( 0.233, 0.26, 0.039, 0.254 ) -shader_param/color = Color( 0.658824, 0.247059, 0.490196, 1 ) - -[sub_resource type="Shader" id=6] -code = "shader_type spatial; - -uniform vec2 position = vec2(0.5); -uniform vec2 proportions = vec2(0.25); - -uniform vec4 color : hint_color; - -float sdBox( in vec2 p, in vec2 b ) -{ - vec2 d = abs(p)-b; - return length(max(d,0.0)) + min(max(d.x,d.y),0.0); -} - -void fragment() { - float box = sdBox(UV - position, proportions); - ALBEDO = mix(color.rgb, vec3(0.0), step(0.0, box)); -}" - -[sub_resource type="ShaderMaterial" id=7] -shader = SubResource( 6 ) -shader_param/position = Vector2( 0.469, 0.5 ) -shader_param/proportions = Vector2( 0.25, 0.25 ) -shader_param/color = Color( 0.658824, 0.247059, 0.490196, 1 ) - -[sub_resource type="Shader" id=8] -code = "shader_type spatial; - -uniform vec2 position = vec2(0.5); -uniform vec2 pointA = vec2(-0.25); -uniform vec2 pointB = vec2(0.25); -uniform float thickness = 0.2; - -uniform vec4 color : hint_color; - -float sdOrientedBox( in vec2 p, in vec2 a, in vec2 b, float th ) -{ - float l = length(b-a); - vec2 d = (b-a)/l; - vec2 q = (p-(a+b)*0.5); - q = mat2(vec2(d.x,-d.y), vec2(d.y,d.x))*q; - q = abs(q)-vec2(l,th)*0.5; - return length(max(q,0.0)) + min(max(q.x,q.y),0.0); -} - -void fragment() { - float box = sdOrientedBox(UV - position, pointA, pointB, thickness); - ALBEDO = mix(color.rgb, vec3(0.0), step(0.0, box)); -}" - -[sub_resource type="ShaderMaterial" id=9] -shader = SubResource( 8 ) -shader_param/position = Vector2( 0.469, 0.5 ) -shader_param/pointA = Vector2( -0.266, -0.271 ) -shader_param/pointB = Vector2( 0.253, 0.169 ) -shader_param/thickness = 0.237 -shader_param/color = Color( 0.658824, 0.247059, 0.490196, 1 ) - -[sub_resource type="Shader" id=10] -code = "shader_type spatial; - -uniform vec2 position = vec2(0.5); -uniform vec2 proportions = vec2(0.25); - -uniform vec4 color : hint_color; - -float ndot(vec2 a, vec2 b ) { return a.x*b.x - a.y*b.y; } -float sdRhombus( in vec2 p, in vec2 b ) -{ - p = abs(p); - float h = clamp( ndot(b-2.0*p,b)/dot(b,b), -1.0, 1.0 ); - float d = length( p-0.5*b*vec2(1.0-h,1.0+h) ); - return d * sign( p.x*b.y + p.y*b.x - b.x*b.y ); -} - -void fragment() { - float rhombus = sdRhombus(UV - position, proportions); - - ALBEDO = mix(color.rgb, vec3(0.0), step(0.0, rhombus)); -}" - -[sub_resource type="ShaderMaterial" id=11] -shader = SubResource( 10 ) -shader_param/position = Vector2( 0.5, 0.5 ) -shader_param/proportions = Vector2( 0.25, 0.25 ) -shader_param/color = Color( 0.658824, 0.247059, 0.490196, 1 ) - -[sub_resource type="Shader" id=12] -code = "shader_type spatial; - -uniform vec2 position = vec2(0.5); -uniform float _r1 = 0.25; -uniform float _r2 = 0.75; -uniform float _he = 0.5; - -uniform vec4 color : hint_color; - -float sdTrapezoid( in vec2 p, in float r1, float r2, float he ) -{ - vec2 k1 = vec2(r2,he); - vec2 k2 = vec2(r2-r1,2.0*he); - p.x = abs(p.x); - vec2 ca = vec2(p.x-min(p.x,(p.y<0.0)?r1:r2), abs(p.y)-he); - vec2 cb = p - k1 + k2*clamp( dot(k1-p,k2)/dot(k2, k2), 0.0, 1.0 ); - float s = (cb.x<0.0 && ca.y<0.0) ? -1.0 : 1.0; - return s*sqrt( min(dot(ca, ca),dot(cb, cb)) ); -} - -void fragment() { - float trapezoid = sdTrapezoid(UV - position, _r1, _r2, _he); - - ALBEDO = mix(color.rgb, vec3(0.0), step(0.0, trapezoid)); -}" - -[sub_resource type="ShaderMaterial" id=13] -shader = SubResource( 12 ) -shader_param/position = Vector2( 0.5, 0.5 ) -shader_param/_r1 = -0.053 -shader_param/_r2 = 0.301 -shader_param/_he = 0.322 -shader_param/color = Color( 0.658824, 0.247059, 0.490196, 1 ) - -[sub_resource type="Shader" id=16] -code = "shader_type spatial; - -uniform vec2 position = vec2(0.5); -uniform float _wi = 0.25; -uniform float _he = 0.75; -uniform float _sk = 0.5; - -uniform vec4 color : hint_color; - -float sdParallelogram( in vec2 p, float wi, float he, float sk ) -{ - vec2 e = vec2(sk,he); - p = (p.y<0.0)?-p:p; - vec2 w = p - e; w.x -= clamp(w.x,-wi,wi); - vec2 d = vec2(dot(w,w), -w.y); - float s = p.x*e.y - p.y*e.x; - p = (s<0.0)?-p:p; - vec2 v = p - vec2(wi,0); v -= e*clamp(dot(v,e)/dot(e,e),-1.0,1.0); - d = min( d, vec2(dot(v,v), wi*he-abs(s))); - return sqrt(d.x)*sign(-d.y); -} - -void fragment() { - float parallelogram = sdParallelogram(UV - position, _wi, _he, _sk); - - ALBEDO = mix(color.rgb, vec3(0.0), step(0.0, parallelogram)); -}" - -[sub_resource type="ShaderMaterial" id=15] -shader = SubResource( 16 ) -shader_param/position = Vector2( 0.5, 0.5 ) -shader_param/_wi = 0.185 -shader_param/_he = 0.206 -shader_param/_sk = -0.119 -shader_param/color = Color( 0.658824, 0.247059, 0.490196, 1 ) - -[sub_resource type="Shader" id=17] -code = "shader_type spatial; - -uniform vec2 position = vec2(0.5); -uniform vec2 _q = vec2(0.75); - -uniform vec4 color : hint_color; - -float sdTriangleIsosceles( in vec2 p, in vec2 q ) -{ - p.x = abs(p.x); - vec2 a = p - q*clamp( dot(p,q)/dot(q,q), 0.0, 1.0 ); - vec2 b = p - q*vec2( clamp( p.x/q.x, 0.0, 1.0 ), 1.0 ); - float s = -sign( q.y ); - vec2 d = min( vec2( dot(a,a), s*(p.x*q.y-p.y*q.x) ), - vec2( dot(b,b), s*(p.y-q.y) )); - return -sqrt(d.x)*sign(d.y); -} - -void fragment() { - float triangle = sdTriangleIsosceles(UV - position, _q); - - ALBEDO = mix(color.rgb, vec3(0.0), step(0.0, triangle)); -}" - -[sub_resource type="ShaderMaterial" id=18] -shader = SubResource( 17 ) -shader_param/position = Vector2( 0.5, 0.259 ) -shader_param/_q = Vector2( 0.367, 0.567 ) -shader_param/color = Color( 0.658824, 0.247059, 0.490196, 1 ) - -[node name="examples3D" type="Spatial"] - -[node name="Circle" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00569987, 0 ) -mesh = SubResource( 1 ) -material/0 = SubResource( 3 ) - -[node name="RoundedBox" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.21705, 0.0241101, 0 ) -mesh = SubResource( 1 ) -material/0 = SubResource( 5 ) - -[node name="Box" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.59847, 0.0241101, 0 ) -mesh = SubResource( 1 ) -material/0 = SubResource( 7 ) - -[node name="RotatedBox" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.17774, 0.0241101, 0 ) -mesh = SubResource( 1 ) -material/0 = SubResource( 9 ) - -[node name="Rhombus" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00569987, 2.46924 ) -mesh = SubResource( 1 ) -material/0 = SubResource( 11 ) - -[node name="Trapezoid" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.20994, 0.00569987, 2.46924 ) -mesh = SubResource( 1 ) -material/0 = SubResource( 13 ) - -[node name="Parallelogram" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.59188, 0.00569987, 2.46924 ) -mesh = SubResource( 1 ) -material/0 = SubResource( 15 ) - -[node name="Triangle" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.12483, 0.00569987, 2.46924 ) -mesh = SubResource( 1 ) -material/0 = SubResource( 18 ) - -[node name="DirectionalLight" type="DirectionalLight" parent="."] -transform = Transform( 1, 0, 0, 0, 0.171482, 0.985187, 0, -0.985187, 0.171482, 0, 2.84318, 0 ) diff --git a/project.godot b/project.godot index 63e31a9..4e06233 100644 --- a/project.godot +++ b/project.godot @@ -75,6 +75,11 @@ _global_script_classes=[ { "path": "res://addons/VisualShaderExtras/BlendModes/Luminosity.gd" }, { "base": "VisualShaderNodeCustom", +"class": "VisualShaderNodeParallelogram", +"language": "GDScript", +"path": "res://addons/VisualShaderExtras/Shapes/Parallelogram.gd" +}, { +"base": "VisualShaderNodeCustom", "class": "VisualShaderNodePinLight", "language": "GDScript", "path": "res://addons/VisualShaderExtras/BlendModes/PinLight.gd" @@ -90,6 +95,16 @@ _global_script_classes=[ { "path": "res://addons/VisualShaderExtras/Utility/Remap.gd" }, { "base": "VisualShaderNodeCustom", +"class": "VisualShaderNodeRhombus", +"language": "GDScript", +"path": "res://addons/VisualShaderExtras/Shapes/Rhombus.gd" +}, { +"base": "VisualShaderNodeCustom", +"class": "VisualShaderNodeRotatedBox", +"language": "GDScript", +"path": "res://addons/VisualShaderExtras/Shapes/RotatedBox.gd" +}, { +"base": "VisualShaderNodeCustom", "class": "VisualShaderNodeRoundedBox", "language": "GDScript", "path": "res://addons/VisualShaderExtras/Shapes/RoundedBox.gd" @@ -100,6 +115,21 @@ _global_script_classes=[ { "path": "res://addons/VisualShaderExtras/Utility/SceneDepth.gd" }, { "base": "VisualShaderNodeCustom", +"class": "VisualShaderNodeTrapezoid", +"language": "GDScript", +"path": "res://addons/VisualShaderExtras/Shapes/Trapezoid.gd" +}, { +"base": "VisualShaderNodeCustom", +"class": "VisualShaderNodeTriangle", +"language": "GDScript", +"path": "res://addons/VisualShaderExtras/Shapes/Triangle.gd" +}, { +"base": "VisualShaderNodeCustom", +"class": "VisualShaderNodeUVFlipbook", +"language": "GDScript", +"path": "res://addons/VisualShaderExtras/UV/UVFlipbook.gd" +}, { +"base": "VisualShaderNodeCustom", "class": "VisualShaderNodeUVPolarCoord", "language": "GDScript", "path": "res://addons/VisualShaderExtras/UV/UVPolarCoord.gd" @@ -123,11 +153,17 @@ _global_script_class_icons={ "VisualShaderNodeLinearBurn": "", "VisualShaderNodeLinearLight": "", "VisualShaderNodeLuminosity": "", +"VisualShaderNodeParallelogram": "", "VisualShaderNodePinLight": "", "VisualShaderNodeRandomRange": "", "VisualShaderNodeRemap": "", +"VisualShaderNodeRhombus": "", +"VisualShaderNodeRotatedBox": "", "VisualShaderNodeRoundedBox": "", "VisualShaderNodeSceneDepth": "", +"VisualShaderNodeTrapezoid": "", +"VisualShaderNodeTriangle": "", +"VisualShaderNodeUVFlipbook": "", "VisualShaderNodeUVPolarCoord": "", "VisualShaderNodeUVTwirl": "" } diff --git a/readme-enable.png.import b/readme-enable.png.import new file mode 100644 index 0000000..29ef749 --- /dev/null +++ b/readme-enable.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/readme-enable.png-86bd87b56cede29f6cfbdb3368d4bc9a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://readme-enable.png" +dest_files=[ "res://.import/readme-enable.png-86bd87b56cede29f6cfbdb3368d4bc9a.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/readme-font.png.import b/readme-font.png.import new file mode 100644 index 0000000..16c88cd --- /dev/null +++ b/readme-font.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/readme-font.png-5a18e7ce514435b80a15dc5058cd11c0.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://readme-font.png" +dest_files=[ "res://.import/readme-font.png-5a18e7ce514435b80a15dc5058cd11c0.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0