Perfected unfa SDF logo!

remotes/1711838515240372319/tmp_refs/heads/godot4-port
unfa 2020-12-16 01:30:25 +01:00
parent 0dd86e4f1a
commit 512d3a22e9
3 changed files with 205 additions and 2 deletions

View File

@ -0,0 +1,203 @@
[gd_resource type="VisualShader" load_steps=22 format=2]
[ext_resource path="res://Assets/Maps/Decoration/unfa stroke NOR.png" type="Texture" id=1]
[ext_resource path="res://Assets/Maps/Decoration/unfa stroke SDF.png" type="Texture" id=2]
[sub_resource type="VisualShaderNodeScalarOp" id=1]
default_input_values = [ 0, 0.5, 1, 0.0 ]
[sub_resource type="VisualShaderNodeScalarConstant" id=2]
constant = 1.0
[sub_resource type="VisualShaderNodeScalarConstant" id=3]
constant = 0.2
[sub_resource type="VisualShaderNodeTexture" id=4]
texture = ExtResource( 2 )
[sub_resource type="VisualShaderNodeTexture" id=5]
texture = ExtResource( 1 )
[sub_resource type="VisualShaderNodeScalarConstant" id=6]
constant = 0.3
[sub_resource type="VisualShaderNodeInput" id=7]
input_name = "uv"
[sub_resource type="VisualShaderNodeVectorDecompose" id=8]
[sub_resource type="VisualShaderNodeVectorCompose" id=9]
[sub_resource type="VisualShaderNodeScalarOp" id=10]
default_input_values = [ 0, 0.0, 1, 4.0 ]
operator = 3
[sub_resource type="VisualShaderNodeScalarOp" id=11]
default_input_values = [ 0, 0.0, 1, 0.375 ]
[sub_resource type="VisualShaderNodeScalarSmoothStep" id=12]
default_input_values = [ 0, 0.48, 1, 0.52, 2, 0.0 ]
[sub_resource type="VisualShaderNodeScalarSmoothStep" id=13]
default_input_values = [ 0, 0.48, 1, 0.52, 2, 0.0 ]
[sub_resource type="VisualShaderNodeVectorDecompose" id=14]
[sub_resource type="VisualShaderNodeScalarOp" id=15]
operator = 7
[sub_resource type="VisualShaderNodeScalarOp" id=16]
operator = 6
[sub_resource type="VisualShaderNodeScalarSmoothStep" id=17]
default_input_values = [ 0, 0.48, 1, 0.52, 2, 0.0 ]
[sub_resource type="VisualShaderNodeScalarUniform" id=18]
uniform_name = "Softness"
[sub_resource type="VisualShaderNodeScalarOp" id=19]
default_input_values = [ 0, 0.5, 1, 0.0 ]
operator = 1
[resource]
code = "shader_type spatial;
render_mode depth_draw_alpha_prepass, specular_schlick_ggx;
uniform float Softness;
uniform sampler2D tex_frg_13;
uniform sampler2D tex_frg_14;
void vertex() {
// Output:0
}
void fragment() {
// ScalarUniform:8
float n_out8p0 = Softness;
// ScalarOp:9
float n_in9p0 = 0.50000;
float n_out9p0 = n_in9p0 - n_out8p0;
// ScalarOp:10
float n_in10p0 = 0.50000;
float n_out10p0 = n_in10p0 + n_out8p0;
// Input:16
vec3 n_out16p0 = vec3(UV, 0.0);
// VectorDecompose:17
float n_out17p0 = n_out16p0.x;
float n_out17p1 = n_out16p0.y;
float n_out17p2 = n_out16p0.z;
// ScalarOp:19
float n_in19p1 = 4.00000;
float n_out19p0 = n_out17p1 / n_in19p1;
// ScalarOp:20
float n_in20p1 = 0.37500;
float n_out20p0 = n_out19p0 + n_in20p1;
// VectorCompose:18
float n_in18p2 = 0.00000;
vec3 n_out18p0 = vec3(n_out17p0, n_out20p0, n_in18p2);
// Texture:13
vec4 tex_frg_13_read = texture(tex_frg_13, n_out18p0.xy);
vec3 n_out13p0 = tex_frg_13_read.rgb;
float n_out13p1 = tex_frg_13_read.a;
// VectorDecompose:23
float n_out23p0 = n_out13p0.x;
float n_out23p1 = n_out13p0.y;
float n_out23p2 = n_out13p0.z;
// ScalarSmoothStep:22
float n_out22p0 = smoothstep(n_out9p0, n_out10p0, n_out23p0);
// ScalarSmoothStep:21
float n_out21p0 = smoothstep(n_out9p0, n_out10p0, n_out23p1);
// ScalarOp:24
float n_out24p0 = min(n_out22p0, n_out21p0);
// ScalarSmoothStep:7
float n_out7p0 = smoothstep(n_out9p0, n_out10p0, n_out23p2);
// ScalarOp:25
float n_out25p0 = max(n_out24p0, n_out7p0);
// Scalar:11
float n_out11p0 = 1.000000;
// Scalar:12
float n_out12p0 = 0.200000;
// Texture:14
vec4 tex_frg_14_read = texture(tex_frg_14, n_out18p0.xy);
vec3 n_out14p0 = tex_frg_14_read.rgb;
float n_out14p1 = tex_frg_14_read.a;
// Scalar:15
float n_out15p0 = 0.300000;
// Output:0
ALPHA = n_out25p0;
METALLIC = n_out11p0;
ROUGHNESS = n_out12p0;
NORMALMAP = n_out14p0;
NORMALMAP_DEPTH = n_out15p0;
}
void light() {
// Output:0
}
"
graph_offset = Vector2( -1040, 70 )
modes/depth_draw = 3
nodes/fragment/0/position = Vector2( 600, 600 )
nodes/fragment/7/node = SubResource( 17 )
nodes/fragment/7/position = Vector2( -100, 400 )
nodes/fragment/8/node = SubResource( 18 )
nodes/fragment/8/position = Vector2( -740, 520 )
nodes/fragment/9/node = SubResource( 19 )
nodes/fragment/9/position = Vector2( -440, 440 )
nodes/fragment/10/node = SubResource( 1 )
nodes/fragment/10/position = Vector2( -440, 580 )
nodes/fragment/11/node = SubResource( 2 )
nodes/fragment/11/position = Vector2( 80, 600 )
nodes/fragment/12/node = SubResource( 3 )
nodes/fragment/12/position = Vector2( 60, 740 )
nodes/fragment/13/node = SubResource( 4 )
nodes/fragment/13/position = Vector2( -680, 120 )
nodes/fragment/14/node = SubResource( 5 )
nodes/fragment/14/position = Vector2( -140, 900 )
nodes/fragment/15/node = SubResource( 6 )
nodes/fragment/15/position = Vector2( 80, 820 )
nodes/fragment/16/node = SubResource( 7 )
nodes/fragment/16/position = Vector2( -1840, 400 )
nodes/fragment/17/node = SubResource( 8 )
nodes/fragment/17/position = Vector2( -1620, 620 )
nodes/fragment/18/node = SubResource( 9 )
nodes/fragment/18/position = Vector2( -960, 620 )
nodes/fragment/19/node = SubResource( 10 )
nodes/fragment/19/position = Vector2( -1380, 700 )
nodes/fragment/20/node = SubResource( 11 )
nodes/fragment/20/position = Vector2( -1160, 720 )
nodes/fragment/21/node = SubResource( 12 )
nodes/fragment/21/position = Vector2( -100, 280 )
nodes/fragment/22/node = SubResource( 13 )
nodes/fragment/22/position = Vector2( -100, 160 )
nodes/fragment/23/node = SubResource( 14 )
nodes/fragment/23/position = Vector2( -388, 229 )
nodes/fragment/24/node = SubResource( 15 )
nodes/fragment/24/position = Vector2( 240, 220 )
nodes/fragment/25/node = SubResource( 16 )
nodes/fragment/25/position = Vector2( 420, 360 )
nodes/fragment/connections = PoolIntArray( 8, 0, 9, 1, 9, 0, 7, 0, 8, 0, 10, 1, 10, 0, 7, 1, 11, 0, 0, 2, 12, 0, 0, 3, 14, 0, 0, 8, 15, 0, 0, 9, 16, 0, 17, 0, 17, 0, 18, 0, 18, 0, 13, 0, 18, 0, 14, 0, 17, 1, 19, 0, 19, 0, 20, 0, 20, 0, 18, 1, 9, 0, 21, 0, 10, 0, 21, 1, 10, 0, 22, 1, 13, 0, 23, 0, 23, 0, 22, 2, 9, 0, 22, 0, 23, 1, 21, 2, 23, 2, 7, 2, 22, 0, 24, 0, 21, 0, 24, 1, 24, 0, 25, 0, 7, 0, 25, 1, 25, 0, 0, 1 )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -22,7 +22,7 @@ uniform_name = "ScalarUniform"
[sub_resource type="VisualShader" id=4]
code = "shader_type spatial;
render_mode world_vertex_coords;
render_mode specular_schlick_ggx, world_vertex_coords;
uniform sampler2D BaseTexture : hint_albedo;
uniform float ScalarUniform;
@ -310,7 +310,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 89.7533, -4.36458, 0 )
monitoring = false
[node name="unfa stroke" parent="." instance=ExtResource( 6 )]
transform = Transform( 1.96589, 0, 0, 0, 1.96589, 0, 0, 0, 1.00018, 0, 3.93148, -4.98989 )
transform = Transform( 1.96589, 0, 0, 0, 1.96589, 0, 0, 0, 1.00018, 0.00612259, 3.93148, -4.98933 )
[node name="SpawnPoint" parent="." instance=ExtResource( 2 )]