Added an SDF-based unfa logo for decoration.

godot4-port
unfa 2020-12-14 23:19:48 +01:00
parent f0846510b8
commit dcb4a061d8
6 changed files with 250 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/unfa stroke NOR.png-ea77fc57d37c780ec7f38fd78cbe7f4d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Maps/Decoration/unfa stroke NOR.png"
dest_files=[ "res://.import/unfa stroke NOR.png-ea77fc57d37c780ec7f38fd78cbe7f4d.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=true
flags/mipmaps=true
flags/anisotropic=true
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/unfa stroke SDF.png-3641780226239c6e0a23248de482929e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Maps/Decoration/unfa stroke SDF.png"
dest_files=[ "res://.import/unfa stroke SDF.png-3641780226239c6e0a23248de482929e.stex" ]
[params]
compress/mode=0
compress/lossy_quality=1.0
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=true
flags/filter=true
flags/mipmaps=true
flags/anisotropic=true
flags/srgb=1
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View File

@ -0,0 +1,175 @@
[gd_scene load_steps=20 format=2]
[ext_resource path="res://Assets/Maps/Decoration/unfa stroke SDF.png" type="Texture" id=1]
[ext_resource path="res://Assets/Maps/Decoration/unfa stroke NOR.png" type="Texture" id=2]
[sub_resource type="QuadMesh" id=9]
size = Vector2( 4, 1 )
[sub_resource type="VisualShaderNodeScalarOp" id=10]
default_input_values = [ 0, 0.5, 1, 0.0 ]
[sub_resource type="VisualShaderNodeScalarConstant" id=11]
constant = 1.0
[sub_resource type="VisualShaderNodeScalarConstant" id=12]
constant = 0.2
[sub_resource type="VisualShaderNodeTexture" id=13]
texture = ExtResource( 1 )
[sub_resource type="VisualShaderNodeTexture" id=14]
texture = ExtResource( 2 )
[sub_resource type="VisualShaderNodeScalarConstant" id=15]
constant = 0.3
[sub_resource type="VisualShaderNodeInput" id=16]
input_name = "uv"
[sub_resource type="VisualShaderNodeVectorDecompose" id=17]
[sub_resource type="VisualShaderNodeVectorCompose" id=18]
[sub_resource type="VisualShaderNodeScalarOp" id=19]
default_input_values = [ 0, 0.0, 1, 4.0 ]
operator = 3
[sub_resource type="VisualShaderNodeScalarOp" id=20]
default_input_values = [ 0, 0.0, 1, 0.375 ]
[sub_resource type="VisualShaderNodeScalarSmoothStep" id=21]
default_input_values = [ 0, 0.48, 1, 0.52, 2, 0.0 ]
[sub_resource type="VisualShaderNodeScalarUniform" id=22]
uniform_name = "Softness"
[sub_resource type="VisualShaderNodeScalarOp" id=23]
default_input_values = [ 0, 0.5, 1, 0.0 ]
operator = 1
[sub_resource type="VisualShader" id=24]
code = "shader_type spatial;
render_mode depth_draw_alpha_prepass;
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;
// ScalarSmoothStep:7
float n_out7p0 = smoothstep(n_out9p0, n_out10p0, dot(n_out13p0, vec3(0.333333, 0.333333, 0.333333)));
// 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_out7p0;
METALLIC = n_out11p0;
ROUGHNESS = n_out12p0;
NORMALMAP = n_out14p0;
NORMALMAP_DEPTH = n_out15p0;
}
void light() {
// Output:0
}
"
graph_offset = Vector2( -1963, -42.5 )
modes/depth_draw = 3
nodes/fragment/0/position = Vector2( 600, 600 )
nodes/fragment/7/node = SubResource( 21 )
nodes/fragment/7/position = Vector2( -100, 380 )
nodes/fragment/8/node = SubResource( 22 )
nodes/fragment/8/position = Vector2( -740, 520 )
nodes/fragment/9/node = SubResource( 23 )
nodes/fragment/9/position = Vector2( -440, 460 )
nodes/fragment/10/node = SubResource( 10 )
nodes/fragment/10/position = Vector2( -440, 600 )
nodes/fragment/11/node = SubResource( 11 )
nodes/fragment/11/position = Vector2( 80, 600 )
nodes/fragment/12/node = SubResource( 12 )
nodes/fragment/12/position = Vector2( 60, 740 )
nodes/fragment/13/node = SubResource( 13 )
nodes/fragment/13/position = Vector2( -680, 120 )
nodes/fragment/14/node = SubResource( 14 )
nodes/fragment/14/position = Vector2( -140, 900 )
nodes/fragment/15/node = SubResource( 15 )
nodes/fragment/15/position = Vector2( 80, 820 )
nodes/fragment/16/node = SubResource( 16 )
nodes/fragment/16/position = Vector2( -1840, 400 )
nodes/fragment/17/node = SubResource( 17 )
nodes/fragment/17/position = Vector2( -1620, 620 )
nodes/fragment/18/node = SubResource( 18 )
nodes/fragment/18/position = Vector2( -960, 620 )
nodes/fragment/19/node = SubResource( 19 )
nodes/fragment/19/position = Vector2( -1380, 700 )
nodes/fragment/20/node = SubResource( 20 )
nodes/fragment/20/position = Vector2( -1160, 720 )
nodes/fragment/connections = PoolIntArray( 8, 0, 9, 1, 9, 0, 7, 0, 8, 0, 10, 1, 10, 0, 7, 1, 7, 0, 0, 1, 11, 0, 0, 2, 12, 0, 0, 3, 13, 0, 7, 2, 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 )
[sub_resource type="ShaderMaterial" id=25]
shader = SubResource( 24 )
shader_param/Softness = 0.01
[node name="unfa stroke" type="MeshInstance"]
transform = Transform( 1.98287, 0, 0, 0, 1.98287, 0, 0, 0, 1.00009, 0, 4, -4.99472 )
mesh = SubResource( 9 )
material/0 = SubResource( 25 )

View File

@ -1,10 +1,11 @@
[gd_scene load_steps=14 format=2]
[gd_scene load_steps=15 format=2]
[ext_resource path="res://LevelComponents/Killfloor.tscn" type="PackedScene" id=1]
[ext_resource path="res://LevelComponents/SpawnPoint.tscn" type="PackedScene" id=2]
[ext_resource path="res://LevelComponents/LevelGeometry.gd" type="Script" id=3]
[ext_resource path="res://Assets/Maps/Rotor/Rotor.gltf" type="PackedScene" id=4]
[ext_resource path="res://Assets/Maps/Rotor/Crank.gd" type="Script" id=5]
[ext_resource path="res://Assets/Maps/Decoration/unfa stroke.tscn" type="PackedScene" id=6]
[sub_resource type="VisualShaderNodeTextureUniformTriplanar" id=1]
output_port_for_preview = 0
@ -21,7 +22,7 @@ uniform_name = "ScalarUniform"
[sub_resource type="VisualShader" id=4]
code = "shader_type spatial;
render_mode specular_schlick_ggx, world_vertex_coords;
render_mode world_vertex_coords;
uniform sampler2D BaseTexture : hint_albedo;
uniform float ScalarUniform;
@ -305,9 +306,12 @@ height = 2.38673
depth = 0.262265
[node name="Killfloor" parent="." instance=ExtResource( 1 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.36458, 0 )
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 )
[node name="SpawnPoint" parent="." instance=ExtResource( 2 )]
[editable path="Rotor"]