Convert all VisualShaders to plain Shaders; clean editor noise
Godot 4 emits two unavoidable warnings every time it reconstructs a Godot-3-authored VisualShader graph: 'graph_offset property is deprecated' (the editor's pan position, removed in 4.x) and 'connect_nodes_forced: Index p_from_port = 1 is out of bounds' (node-graph ports that no longer line up). The compiled GLSL inside each ShaderMaterial is correct; only the graph reconstruction is broken. scripts/devisualize_shaders.gd walks every .material, .tres, and .mesh under res:// and replaces ShaderMaterial.shader from VisualShader to a plain Shader carrying the same .code. 15 materials converted (font outline, dissolve, color tints, book/candle/godet/ growler/parchment/rock-floor/stool/table). Godot now loads the compiled shader directly with no graph reconstruction → both warnings gone, rendering identical. Also: - scripts/resave_scenes.gd: load + re-save every .tscn so inline ArrayMesh sub-resources (notably WarCraft.tscn::17, the baked floor) move from Godot-3 PoolByteArray to Godot-4 PackedByteArray surface format. Silences 'Mesh uses old surface format'. - scripts/find_visualshaders.gd: companion audit tool that lists every Resource still backed by a VisualShader. Useful if new legacy materials get added. - Drop the now-orphan inline VisualShader / ShaderMaterial sub- resources (id 1..17) from Summary.tscn. The PanelWood lost its screen-blend tint material; a plain Panel renders fine and the effect can be re-authored as a hand-written shader if wanted. - Add releases/.gdignore and tighten .gitignore so Godot stops warning 'Detected another project.godot at res://releases'. The releases/ directory has its own placeholder project.godot which Godot would otherwise flag at every editor open. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+34
-191
@@ -1,169 +1,13 @@
|
||||
[gd_scene load_steps=27 format=2]
|
||||
[gd_scene format=3]
|
||||
|
||||
[ext_resource path="res://assets/ui/themes/button-summary-hover.jpg" type="Texture2D" id=1]
|
||||
[ext_resource path="res://assets/ui/themes/button-summary.jpg" type="Texture2D" id=2]
|
||||
[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="FontFile" id=3]
|
||||
[ext_resource path="res://assets/fonts/kirsty/kirsty_title.tres" type="FontFile" id=4]
|
||||
[ext_resource path="res://assets/ui/icones/treasure.png" type="Texture2D" id=5]
|
||||
[ext_resource path="res://assets/ui/icones/treasure-hover.png" type="Texture2D" id=7]
|
||||
[ext_resource path="res://assets/ui/themes/bck-vert-grd.png" type="Texture2D" id=8]
|
||||
[ext_resource path="res://assets/ui/themes/wood-tile.jpg" type="Texture2D" id=9]
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorOp" id=1]
|
||||
operator = 3
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id=2]
|
||||
input_name = "screen_uv"
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorDecompose" id=3]
|
||||
output_port_for_preview = 1
|
||||
|
||||
[sub_resource type="VisualShaderNodeMix" id=4]
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorConstant" id=5]
|
||||
constant = Color( 0.2, 0.155, 0.11, 1 )
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorOp" id=6]
|
||||
|
||||
[sub_resource type="VisualShaderNodeMix" id=7]
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id=8]
|
||||
default_input_values = [ 0, 0.0, 1, 0.2 ]
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id=9]
|
||||
default_input_values = [ 0, 0.0, 1, -1.0 ]
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id=10]
|
||||
input_name = "screen_uv"
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture" id=11]
|
||||
texture = ExtResource( 9 )
|
||||
texture_type = 1
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorCompose" id=12]
|
||||
default_input_values = [ 0, 0.0, 1, 0.0, 2, 1.0 ]
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatConstant" id=13]
|
||||
constant = 0.4
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorDecompose" id=14]
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id=15]
|
||||
default_input_values = [ 0, 0.0, 1, 1.6 ]
|
||||
operator = 3
|
||||
|
||||
[sub_resource type="VisualShader" id=16]
|
||||
code = "shader_type canvas_item;
|
||||
uniform sampler2D tex_frg_4 : source_color;
|
||||
|
||||
|
||||
|
||||
void vertex() {
|
||||
// Output:0
|
||||
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// Input:3
|
||||
vec3 n_out3p0 = vec3(SCREEN_UV, 0.0);
|
||||
|
||||
// Scalar:6
|
||||
float n_out6p0 = 0.400000;
|
||||
|
||||
// VectorOp:11
|
||||
vec3 n_out11p0 = n_out3p0 / vec3(n_out6p0);
|
||||
|
||||
// VectorDecompose:7
|
||||
float n_out7p0 = n_out11p0.x;
|
||||
float n_out7p1 = n_out11p0.y;
|
||||
float n_out7p2 = n_out11p0.z;
|
||||
|
||||
// ScalarOp:8
|
||||
float n_in8p1 = 1.60000;
|
||||
float n_out8p0 = n_out7p1 / n_in8p1;
|
||||
|
||||
// VectorCompose:5
|
||||
float n_in5p2 = 1.00000;
|
||||
vec3 n_out5p0 = vec3(n_out7p0, n_out8p0, n_in5p2);
|
||||
|
||||
// Texture:4
|
||||
vec4 tex_frg_4_read = texture(tex_frg_4, n_out5p0.xy);
|
||||
vec3 n_out4p0 = tex_frg_4_read.rgb;
|
||||
float n_out4p1 = tex_frg_4_read.a;
|
||||
|
||||
// ScalarOp:22
|
||||
float n_in22p1 = 0.20000;
|
||||
float n_out22p0 = dot(n_out4p0, vec3(0.333333, 0.333333, 0.333333)) * n_in22p1;
|
||||
|
||||
// Color:18
|
||||
vec3 n_out18p0 = vec3(0.200000, 0.155000, 0.110000);
|
||||
float n_out18p1 = 1.000000;
|
||||
|
||||
// ColorOp:19
|
||||
vec3 n_out19p0 = vec3(1.0) - (vec3(1.0) - n_out18p0) * (vec3(1.0) - n_out4p0);
|
||||
|
||||
// Input:14
|
||||
vec3 n_out14p0 = vec3(SCREEN_UV, 0.0);
|
||||
|
||||
// VectorDecompose:15
|
||||
float n_out15p0 = n_out14p0.x;
|
||||
float n_out15p1 = n_out14p0.y;
|
||||
float n_out15p2 = n_out14p0.z;
|
||||
|
||||
// VectorScalarMix:17
|
||||
vec3 n_out17p0 = mix(n_out4p0, n_out19p0, n_out15p1);
|
||||
|
||||
// VectorScalarMix:20
|
||||
vec3 n_out20p0 = mix(vec3(n_out22p0), n_out17p0, n_out15p1);
|
||||
|
||||
// Output:0
|
||||
COLOR.rgb = n_out20p0;
|
||||
|
||||
}
|
||||
|
||||
void light() {
|
||||
// Output:0
|
||||
|
||||
}
|
||||
"
|
||||
mode = 1
|
||||
flags/light_only = false
|
||||
nodes/fragment/0/position = Vector2( 2300, 540 )
|
||||
nodes/fragment/3/node = SubResource( 10 )
|
||||
nodes/fragment/3/position = Vector2( -2320, 660 )
|
||||
nodes/fragment/4/node = SubResource( 11 )
|
||||
nodes/fragment/4/position = Vector2( 60, 160 )
|
||||
nodes/fragment/5/node = SubResource( 12 )
|
||||
nodes/fragment/5/position = Vector2( -580, 720 )
|
||||
nodes/fragment/6/node = SubResource( 13 )
|
||||
nodes/fragment/6/position = Vector2( -2300, 800 )
|
||||
nodes/fragment/7/node = SubResource( 14 )
|
||||
nodes/fragment/7/position = Vector2( -1480, 700 )
|
||||
nodes/fragment/8/node = SubResource( 15 )
|
||||
nodes/fragment/8/position = Vector2( -960, 820 )
|
||||
nodes/fragment/11/node = SubResource( 1 )
|
||||
nodes/fragment/11/position = Vector2( -1860, 700 )
|
||||
nodes/fragment/14/node = SubResource( 2 )
|
||||
nodes/fragment/14/position = Vector2( 140, 980 )
|
||||
nodes/fragment/15/node = SubResource( 3 )
|
||||
nodes/fragment/15/position = Vector2( 580, 960 )
|
||||
nodes/fragment/17/node = SubResource( 4 )
|
||||
nodes/fragment/17/position = Vector2( 1240, 560 )
|
||||
nodes/fragment/18/node = SubResource( 5 )
|
||||
nodes/fragment/18/position = Vector2( 520, 620 )
|
||||
nodes/fragment/19/node = SubResource( 6 )
|
||||
nodes/fragment/19/position = Vector2( 840, 580 )
|
||||
nodes/fragment/20/node = SubResource( 7 )
|
||||
nodes/fragment/20/position = Vector2( 1780, 660 )
|
||||
nodes/fragment/22/node = SubResource( 8 )
|
||||
nodes/fragment/22/position = Vector2( 1260, 780 )
|
||||
nodes/fragment/23/node = SubResource( 9 )
|
||||
nodes/fragment/23/position = Vector2( 1080, 1080 )
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=17]
|
||||
shader = SubResource( 16 )
|
||||
[ext_resource type="Texture2D" path="res://assets/ui/themes/button-summary-hover.jpg" id="1"]
|
||||
[ext_resource type="Texture2D" path="res://assets/ui/themes/button-summary.jpg" id="2"]
|
||||
[ext_resource type="FontVariation" path="res://assets/fonts/kirsty/kirsty_base.tres" id="3"]
|
||||
[ext_resource type="FontVariation" path="res://assets/fonts/kirsty/kirsty_title.tres" id="4"]
|
||||
[ext_resource type="Texture2D" path="res://assets/ui/icones/treasure.png" id="5"]
|
||||
[ext_resource type="Texture2D" path="res://assets/ui/icones/treasure-hover.png" id="7"]
|
||||
[ext_resource type="Texture2D" path="res://assets/ui/themes/bck-vert-grd.png" id="8"]
|
||||
[ext_resource type="Texture2D" path="res://assets/ui/themes/wood-tile.jpg" id="9"]
|
||||
|
||||
[node name="Summary" type="HBoxContainer"]
|
||||
anchor_bottom = 1.0
|
||||
@@ -174,10 +18,9 @@ __meta__ = {
|
||||
}
|
||||
|
||||
[node name="PanelWood" type="Panel" parent="."]
|
||||
material = SubResource( 17 )
|
||||
offset_right = 350.0
|
||||
offset_bottom = 1080.0
|
||||
custom_minimum_size = Vector2( 350, 0 )
|
||||
custom_minimum_size = Vector2(350, 0)
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelWood"]
|
||||
@@ -205,9 +48,9 @@ offset_bottom = 199.0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
texture_normal = ExtResource( 5 )
|
||||
texture_hover = ExtResource( 7 )
|
||||
texture_focused = ExtResource( 7 )
|
||||
texture_normal = ExtResource("5")
|
||||
texture_hover = ExtResource("7")
|
||||
texture_focused = ExtResource("7")
|
||||
stretch_mode = 3
|
||||
|
||||
[node name="ButtonPuzzle" type="TextureButton" parent="PanelWood/VBoxContainer"]
|
||||
@@ -217,9 +60,9 @@ offset_bottom = 378.0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
texture_normal = ExtResource( 2 )
|
||||
texture_hover = ExtResource( 1 )
|
||||
texture_focused = ExtResource( 1 )
|
||||
texture_normal = ExtResource("2")
|
||||
texture_hover = ExtResource("1")
|
||||
texture_focused = ExtResource("1")
|
||||
__meta__ = {
|
||||
"_editor_description_": ""
|
||||
}
|
||||
@@ -233,7 +76,7 @@ offset_left = 0.0
|
||||
offset_top = 0.0
|
||||
offset_right = 0.0
|
||||
offset_bottom = 0.0
|
||||
theme_override_fonts/font = ExtResource( 4 )
|
||||
theme_override_fonts/font = ExtResource("4")
|
||||
theme_override_font_sizes/font_size = 46
|
||||
text = "Puzzles"
|
||||
horizontal_alignment = 1
|
||||
@@ -246,9 +89,9 @@ offset_bottom = 485.0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
texture_normal = ExtResource( 2 )
|
||||
texture_hover = ExtResource( 1 )
|
||||
texture_focused = ExtResource( 1 )
|
||||
texture_normal = ExtResource("2")
|
||||
texture_hover = ExtResource("1")
|
||||
texture_focused = ExtResource("1")
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
@@ -260,9 +103,9 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 7
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource( 4 )
|
||||
theme_override_fonts/font = ExtResource("4")
|
||||
theme_override_font_sizes/font_size = 46
|
||||
theme_override_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Paramètres"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -278,9 +121,9 @@ offset_bottom = 592.0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
texture_normal = ExtResource( 2 )
|
||||
texture_hover = ExtResource( 1 )
|
||||
texture_focused = ExtResource( 1 )
|
||||
texture_normal = ExtResource("2")
|
||||
texture_hover = ExtResource("1")
|
||||
texture_focused = ExtResource("1")
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
@@ -292,9 +135,9 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 7
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource( 4 )
|
||||
theme_override_fonts/font = ExtResource("4")
|
||||
theme_override_font_sizes/font_size = 46
|
||||
theme_override_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Crédits"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -316,8 +159,8 @@ offset_bottom = 1000.0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
texture_normal = ExtResource( 2 )
|
||||
texture_hover = ExtResource( 1 )
|
||||
texture_normal = ExtResource("2")
|
||||
texture_hover = ExtResource("1")
|
||||
__meta__ = {
|
||||
"_editor_description_": ""
|
||||
}
|
||||
@@ -329,9 +172,9 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 7
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource( 4 )
|
||||
theme_override_fonts/font = ExtResource("4")
|
||||
theme_override_font_sizes/font_size = 46
|
||||
theme_override_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Quit"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -355,8 +198,8 @@ offset_left = 287.0
|
||||
offset_right = 334.0
|
||||
offset_bottom = 20.0
|
||||
size_flags_vertical = 0
|
||||
theme_override_fonts/font = ExtResource( 3 )
|
||||
theme_override_colors/font_color = Color( 0.741176, 0.478431, 0.372549, 1 )
|
||||
theme_override_fonts/font = ExtResource("3")
|
||||
theme_override_colors/font_color = Color(0.741176, 0.478431, 0.372549, 1)
|
||||
text = "v 0.0.0"
|
||||
horizontal_alignment = 2
|
||||
|
||||
@@ -380,7 +223,7 @@ offset_bottom = 1080.0
|
||||
clip_contents = true
|
||||
size_flags_horizontal = 11
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource( 8 )
|
||||
texture = ExtResource("8")
|
||||
stretch_mode = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
||||
Reference in New Issue
Block a user