Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
99e473a
Added my dev files. Checked through the demos and had to rewire a few
Jan 3, 2023
bc786f5
Added my dev files. Checked through the demos and had to rewire a few
Jan 3, 2023
266181b
Merge branch 'donnv2' of github.com:donn-xx/GodotVisualShader-Extras …
Jan 4, 2023
0131e79
Fixed some things as per PR chat with Paddy.
Jan 4, 2023
7fb4c9d
Merge branch 'donnv2' of github.com:donn-xx/GodotVisualShader-Extras …
Jan 4, 2023
c60a65b
Some succes with a passthrough connector.
Jan 4, 2023
f56fe2a
weird alternating behaviour in the visual node when I save the script.
Jan 5, 2023
e7d0431
Can't make the two port connector work. So frustrating.
Jan 5, 2023
eb53fb9
Merge branch 'donnv2' of github.com:donn-xx/GodotVisualShader-Extras …
Jan 5, 2023
d7fd784
trying to see if there's a way to detect connect and disconnect from …
Jan 7, 2023
826e96f
impasse
Jan 9, 2023
da019a1
file clean
Jan 9, 2023
0ee1058
mixed feelings
Jan 10, 2023
6975e6b
New and simpler version of the ShaderLib. Reverted description on all
Jan 10, 2023
240f785
New and simpler version of the ShaderLib. Reverted description on all
Jan 10, 2023
4acbebb
merging
Jan 11, 2023
81c533c
Simplified ShaderLib. It's not compulsory, only use when you have
Jan 11, 2023
b69a89f
Simplified ShaderLib. It's not compulsory, only use when you have
Jan 11, 2023
b7a8d83
Merge branch 'donnv2' of github.com:donn-xx/GodotVisualShader-Extras …
Jan 11, 2023
c05c017
Added the rock and moss materials at 256x256 res. Thanks Arnklit.
Jan 11, 2023
4dd77a3
Merge branch 'donnv2' of github.com:donn-xx/GodotVisualShader-Extras …
Jan 11, 2023
41f13a4
Added the new textures and removed references to the old ones. Hopfully
Jan 11, 2023
1e76c23
Merge branch 'donnv2' of github.com:donn-xx/GodotVisualShader-Extras …
Jan 11, 2023
b757199
Added my latest Connector nodes - One to Many and Many to Many. Demos
Jan 11, 2023
3cc94ed
Merge branch 'donnv2' of github.com:donn-xx/GodotVisualShader-Extras …
Jan 14, 2023
77370b9
Removed UVTiler from main directory structure and left it in dbat/nodes
Jan 14, 2023
85a2073
Merge branch 'donnv2' of github.com:donn-xx/GodotVisualShader-Extras …
Jan 14, 2023
67404b0
Simplified the connectors
Jan 23, 2023
7ce846b
Added a Parallax Mapping node. Simplified the connectors, renamed to
Jan 23, 2023
e5bc13f
Fixing weird GitHub thing.
Jan 24, 2023
323a63d
Removed Temp prefix from class_names
Jan 24, 2023
1552326
Moved files to match desired filesystem
Jan 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ export_presets.cfg

# Mono-specific ignores
.mono/
data_*/
data_*/

# Ignore dbat dev stuff
dbat_dev/
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[gd_resource type="VisualShader" load_steps=7 format=3]

[ext_resource type="Script" path="res://addons/VisualShaderExtras/Filters/LodBlur.gd" id="1_nbohf"]

[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_jfkp4"]
parameter_name = "Texture2DParameter"
texture_type = 1
texture_filter = 3

[sub_resource type="VisualShaderNodeCustom" id="VisualShaderNodeCustom_8pvek"]
default_input_values = [2, 1.115]
initialized = true
script = ExtResource("1_nbohf")

[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_r8lli"]
input_name = "time"

[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_q7lk4"]
function = 1

[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_4wbml"]
default_input_values = [0, 0.0, 1, 10.0]
operator = 2

[resource]
code = "shader_type canvas_item;
uniform sampler2D Texture2DParameter : source_color, filter_nearest_mipmap;



void fragment() {
// Input:5
float n_out5p0 = TIME;


// FloatFunc:6
float n_out6p0 = cos(n_out5p0);


// FloatOp:7
float n_in7p1 = 10.00000;
float n_out7p0 = n_out6p0 * n_in7p1;


vec3 n_out3p0;
// LoDBlur:3
{

//When the sampler is set to Linear Mipmap it works best.
//The Bias will cause blurring.
vec4 color = textureLod(Texture2DParameter, UV, n_out7p0);
n_out3p0 = color.rgb;

}


// Output:0
COLOR.rgb = n_out3p0;


}
"
graph_offset = Vector2(-298, -23)
mode = 1
flags/light_only = false
nodes/fragment/0/position = Vector2(500, 120)
nodes/fragment/2/node = SubResource("VisualShaderNodeTexture2DParameter_jfkp4")
nodes/fragment/2/position = Vector2(-193.333, 281.667)
nodes/fragment/3/node = SubResource("VisualShaderNodeCustom_8pvek")
nodes/fragment/3/position = Vector2(220, 180)
nodes/fragment/5/node = SubResource("VisualShaderNodeInput_r8lli")
nodes/fragment/5/position = Vector2(-560, 40)
nodes/fragment/6/node = SubResource("VisualShaderNodeFloatFunc_q7lk4")
nodes/fragment/6/position = Vector2(-260, 20)
nodes/fragment/7/node = SubResource("VisualShaderNodeFloatOp_4wbml")
nodes/fragment/7/position = Vector2(-47.2, 39.6)
nodes/fragment/connections = PackedInt32Array(2, 0, 3, 1, 3, 0, 0, 0, 5, 0, 6, 0, 6, 0, 7, 0, 7, 0, 3, 2)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[gd_scene load_steps=4 format=3]

[ext_resource type="Shader" path="res://addons/VisualShaderExtras/AddonAssets/dbat_demos/blur/blur_2d_demo.tres" id="1_6t74a"]
[ext_resource type="Texture2D" uid="uid://dja24d5rtr2ae" path="res://addons/VisualShaderExtras/AddonAssets/dbat_demos/resources/icon.svg" id="1_wby0f"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_gswws"]
shader = ExtResource("1_6t74a")
shader_parameter/Texture2DParameter = ExtResource("1_wby0f")

[node name="blur_2d_demo" type="Node2D"]

[node name="TextureRect" type="TextureRect" parent="."]
material = SubResource("ShaderMaterial_gswws")
offset_right = 40.0
offset_bottom = 40.0
texture = ExtResource("1_wby0f")
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[gd_scene load_steps=5 format=3]

[ext_resource type="Shader" path="res://addons/VisualShaderExtras/AddonAssets/dbat_demos/blur/blur_3d_vshader_demo.tres" id="1_8qkj1"]
[ext_resource type="Texture2D" uid="uid://ba7cojxxohdjb" path="res://addons/VisualShaderExtras/AddonAssets/dbat_demos/resources/icon.png" id="5_vc82q"]

[sub_resource type="PlaneMesh" id="PlaneMesh_xbehk"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_mjkcc"]
render_priority = 0
shader = ExtResource("1_8qkj1")
shader_parameter/Blur = 1.755
shader_parameter/Texture2DParameter = ExtResource("5_vc82q")

[node name="Node3D" type="Node3D"]

[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
mesh = SubResource("PlaneMesh_xbehk")
surface_material_override/0 = SubResource("ShaderMaterial_mjkcc")
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[gd_resource type="VisualShader" load_steps=5 format=3]

[ext_resource type="Script" path="res://addons/VisualShaderExtras/Filters/LodBlur.gd" id="1_u5y11"]

[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_qxj8l"]
parameter_name = "Texture2DParameter"
texture_type = 1
texture_filter = 4

[sub_resource type="VisualShaderNodeCustom" id="VisualShaderNodeCustom_e5pk6"]
default_input_values = [2, 1.115]
initialized = true
script = ExtResource("1_u5y11")

[sub_resource type="VisualShaderNodeFloatParameter" id="VisualShaderNodeFloatParameter_k3rmt"]
parameter_name = "Blur"
hint = 1
max = 10.0
default_value_enabled = true

[resource]
code = "shader_type spatial;
uniform sampler2D Texture2DParameter : source_color, filter_linear_mipmap;
uniform float Blur : hint_range(0, 10) = 0;



void fragment() {
// FloatParameter:23
float n_out23p0 = Blur;


vec3 n_out22p0;
// LoDBlur:22
{

//When the sampler is set to Linear Mipmap it works best.
//The Bias will cause blurring.
vec4 color = textureLod(Texture2DParameter, UV, n_out23p0);
n_out22p0 = color.rgb;

}


// Output:0
ALBEDO = n_out22p0;


}
"
graph_offset = Vector2(-942.389, 686.417)
nodes/fragment/0/position = Vector2(-280, 1080)
nodes/fragment/18/node = SubResource("VisualShaderNodeTexture2DParameter_qxj8l")
nodes/fragment/18/position = Vector2(-980, 1240)
nodes/fragment/22/node = SubResource("VisualShaderNodeCustom_e5pk6")
nodes/fragment/22/position = Vector2(-580, 1140)
nodes/fragment/23/node = SubResource("VisualShaderNodeFloatParameter_k3rmt")
nodes/fragment/23/position = Vector2(-980, 960)
nodes/fragment/connections = PackedInt32Array(18, 0, 22, 1, 23, 0, 22, 2, 22, 0, 0, 0)
110 changes: 110 additions & 0 deletions addons/VisualShaderExtras/AddonAssets/dbat_demos/blur/blurthing.ptex
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"connections": [
{
"from": "shape",
"from_port": 0,
"to": "gaussian_blur_x",
"to_port": 0
},
{
"from": "gaussian_blur_x",
"from_port": 0,
"to": "Material",
"to_port": 0
},
{
"from": "gaussian_blur_x",
"from_port": 0,
"to": "debug",
"to_port": 0
}
],
"label": "Graph",
"longdesc": "",
"name": "@@292",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"export_paths": {
"Godot/Godot 4": "/home/donn/Projects/03.GameDev/Pelagic/00.dev/godot_related_repos/GodotVisualShader-Extras-Fork/addons/VisualShaderExtras/dbat/demos/blur/mmblurthing"
},
"name": "Material",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"albedo_color": {
"a": 1,
"b": 1,
"g": 1,
"r": 1,
"type": "Color"
},
"ao": 1,
"depth_scale": 0.5,
"emission_energy": 1,
"flags_transparent": true,
"metallic": 0,
"normal": 1,
"roughness": 1
},
"seed": 0,
"seed_locked": false,
"type": "material_dynamic"
},
{
"name": "gaussian_blur_x",
"node_position": {
"x": -408.200012,
"y": -25
},
"parameters": {
"sigma": 35.700001,
"size": 9
},
"seed": 0,
"seed_locked": false,
"type": "gaussian_blur_x"
},
{
"name": "shape",
"node_position": {
"x": -612.200012,
"y": -51
},
"parameters": {
"edge": 0,
"radius": 0.78,
"shape": 1,
"sides": 6
},
"seed": 0,
"seed_locked": false,
"type": "shape"
},
{
"name": "debug",
"node_position": {
"x": -125.200012,
"y": -101
},
"parameters": {

},
"seed": 0,
"seed_locked": false,
"type": "debug"
}
],
"parameters": {

},
"seed": 0,
"seed_locked": false,
"shortdesc": "",
"type": "graph"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
[gd_resource type="VisualShader" load_steps=10 format=3]

[ext_resource type="Script" path="res://addons/VisualShaderExtras/Usability/ColorMask.gd" id="1_8hvao"]
[ext_resource type="Texture2D" uid="uid://dja24d5rtr2ae" path="res://addons/VisualShaderExtras/AddonAssets/dbat_demos/resources/icon.svg" id="2_lfyqb"]

[sub_resource type="VisualShaderNodeCustom" id="VisualShaderNodeCustom_ipv1k"]
output_port_for_preview = 0
default_input_values = [2, 0.502]
initialized = true
script = ExtResource("1_8hvao")

[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_j6g58"]
source = 5
texture = ExtResource("2_lfyqb")

[sub_resource type="VisualShaderNodeColorConstant" id="VisualShaderNodeColorConstant_p8f0m"]
constant = Color(0.258824, 0.556863, 0.741176, 1)

[sub_resource type="VisualShaderNodeColorConstant" id="VisualShaderNodeColorConstant_2i2pe"]
constant = Color(0.910156, 0.842927, 0.061996, 1)

[sub_resource type="VisualShaderNodeColorConstant" id="VisualShaderNodeColorConstant_0172k"]
constant = Color(0.1, 0.075, 1, 1)

[sub_resource type="VisualShaderNodeMix" id="VisualShaderNodeMix_jdtvy"]
default_input_values = [0, Vector3(0, 0, 0), 1, Vector3(1, 1, 1), 2, 0.5]
op_type = 4

[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_ticoq"]
parameter_name = "Texture2DParameter"
texture_type = 1
texture_filter = 2

[resource]
code = "shader_type canvas_item;
uniform sampler2D Texture2DParameter : source_color, filter_linear;


// ColorMask

float compare_VisualShaderExtrasUsabilityColorMask(vec4 in1, vec4 in2, float fuzz)
{
return dot(abs(in1-in2), vec4(fuzz));
}



void fragment() {
// ColorConstant:7
vec4 n_out7p0 = vec4(0.100000, 0.075000, 1.000000, 1.000000);


// ColorConstant:5
vec4 n_out5p0 = vec4(0.910156, 0.842927, 0.061996, 1.000000);


vec4 n_out3p0;
// Texture2D:3
n_out3p0 = texture(Texture2DParameter, UV);


// ColorConstant:4
vec4 n_out4p0 = vec4(0.258824, 0.556863, 0.741176, 1.000000);


float n_out10p0;
// ColorMask:10
float n_in10p2 = 0.50200;
{
n_out10p0 = compare_VisualShaderExtrasUsabilityColorMask(n_out3p0,n_out4p0,n_in10p2);
}


// Mix:8
vec3 n_out8p0 = mix(vec3(n_out7p0.xyz), vec3(n_out5p0.xyz), n_out10p0);


// Output:0
COLOR.rgb = n_out8p0;


}
"
graph_offset = Vector2(-334.81, -34.9294)
mode = 1
flags/light_only = false
nodes/fragment/0/position = Vector2(720, 140)
nodes/fragment/3/node = SubResource("VisualShaderNodeTexture_j6g58")
nodes/fragment/3/position = Vector2(-180, 60)
nodes/fragment/4/node = SubResource("VisualShaderNodeColorConstant_p8f0m")
nodes/fragment/4/position = Vector2(-120, 340)
nodes/fragment/5/node = SubResource("VisualShaderNodeColorConstant_2i2pe")
nodes/fragment/5/position = Vector2(280, 60)
nodes/fragment/7/node = SubResource("VisualShaderNodeColorConstant_0172k")
nodes/fragment/7/position = Vector2(360, 320)
nodes/fragment/8/node = SubResource("VisualShaderNodeMix_jdtvy")
nodes/fragment/8/position = Vector2(540, 140)
nodes/fragment/9/node = SubResource("VisualShaderNodeTexture2DParameter_ticoq")
nodes/fragment/9/position = Vector2(-580, 100)
nodes/fragment/10/node = SubResource("VisualShaderNodeCustom_ipv1k")
nodes/fragment/10/position = Vector2(60, 180)
nodes/fragment/connections = PackedInt32Array(9, 0, 3, 2, 7, 0, 8, 0, 5, 0, 8, 1, 8, 0, 0, 0, 3, 0, 10, 0, 4, 0, 10, 1, 10, 0, 8, 2)
Loading