9.11上午

This commit is contained in:
TsubakiLoL 2024-09-11 11:43:24 +08:00
parent a581ee003b
commit 0579a41e5a
25 changed files with 1433 additions and 31 deletions

View File

@ -0,0 +1,46 @@
shader_type canvas_item;
uniform float Fuzziness = 5;
float normpdf(in float x, in float sigma){
return 0.39894*exp(-.5*x*x/(sigma*sigma))/sigma;
}
uniform float radius : hint_range(0.0, 1.0) = 0.0;
uniform vec2 size = vec2(1.0, 1.0);
uniform bool cool = false;
vec4 gaussian_blur(sampler2D src, vec2 size_gb, vec2 uv, int m_size){
vec4 cc = texture(src, uv);
vec3 c = cc.rgb;
int k_size = (m_size-1)/2;
float sigma = 7.;
vec3 final_color = vec3(0.);
float z = 0.;
for(int i=-k_size;i<=k_size;i++){
float n = normpdf(float(i), sigma);
z+=n;
for(int j=-k_size;j<=k_size;j++){
final_color+=n*n*texture(src,uv+(size_gb*Fuzziness)*vec2(float(i),float(j))).rgb;
}
}
return vec4(final_color/z/z,1.);
}
void fragment(){
if (cool == false ){
COLOR = texture(TEXTURE, UV);
}
vec2 size_ratio = vec2(max(1.0, size.x / size.y), max(1.0, size.y / size.x));
float half_radius = 0.5 * radius;
vec2 dist_max = half_radius / size_ratio;
vec2 edge_pos = clamp(UV, dist_max, 1.0 - dist_max);
float edge_dist = distance(UV * size_ratio, edge_pos * size_ratio);
COLOR = gaussian_blur(TEXTURE ,TEXTURE_PIXEL_SIZE ,UV , 20);
COLOR.a *= step(edge_dist, half_radius + 0.000001);
}

42
res/shader/mask.gdshader Normal file
View File

@ -0,0 +1,42 @@
shader_type canvas_item;
uniform sampler2D texture;
uniform float time;
uniform vec2 resolution;
uniform vec4 dissolveColor; // Controllo del colore e della trasparenza dell'effetto di dissolvenza
uniform float circleSize; // Controllo sulla grandezza del cerchio
uniform sampler2D hologramTexture;
uniform float maxR = .5;
uniform float smoothness = .5;
uniform float displayRatio =1.7;
void fragment() {
// normalized configurable factors
// float maxR = .5;
float minR = maxR * (1.0 - smoothness);
vec2 centerUv = vec2(0.5, 0.5);
// just to play animation
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = UV;
vec2 duv = uv;
duv.x *= displayRatio;
centerUv.x *= displayRatio;
vec3 col = texture(texture, uv).rgb;
float dist = length(centerUv - duv);
COLOR.a = 0.;
if (dist > maxR) {
COLOR = vec4(0.0, 0.0, 0.0, 1.0);
}
if (maxR > dist && dist > minR) {
col = mix(col, vec3(0.0, 0.0, 0.0), smoothstep(minR/maxR,1.0,dist/maxR));
}
// COLOR = vec4(col,1.0);
}

View File

@ -0,0 +1,6 @@
[gd_resource type="StyleBoxTexture" load_steps=2 format=3 uid="uid://8q5lafq5crxi"]
[ext_resource type="Texture2D" uid="uid://duej6jo0puq2s" path="res://res/ui/ui_006_special_ability/图层118.png" id="1_hj0xd"]
[resource]
texture = ExtResource("1_hj0xd")

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://duej6jo0puq2s"
path="res://.godot/imported/图层118.png-350d57d6d5390bbb73634cd046217fa6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://res/ui/ui_006_special_ability/图层118.png"
dest_files=["res://.godot/imported/图层118.png-350d57d6d5390bbb73634cd046217fa6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d38grwcxuro4m"
path="res://.godot/imported/图层125.png-4475d54a3f39c13d0472527c03ee172c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://res/ui/ui_006_special_ability/图层125.png"
dest_files=["res://.godot/imported/图层125.png-4475d54a3f39c13d0472527c03ee172c.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bbxjo41itbu2"
path="res://.godot/imported/图层126.png-414d5fdc9e639a4f29590c42ed278f36.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://res/ui/ui_006_special_ability/图层126.png"
dest_files=["res://.godot/imported/图层126.png-414d5fdc9e639a4f29590c42ed278f36.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cup7twtrpwa5x"
path="res://.godot/imported/图层137.png-db910cd3d62c8da29de2f2e7fcd97041.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://res/ui/ui_006_special_ability/图层137.png"
dest_files=["res://.godot/imported/图层137.png-db910cd3d62c8da29de2f2e7fcd97041.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://3csn5f230iec"
path="res://.godot/imported/图层138.png-6d9b75b2449a12d014c5fda78669a6bd.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://res/ui/ui_006_special_ability/图层138.png"
dest_files=["res://.godot/imported/图层138.png-6d9b75b2449a12d014c5fda78669a6bd.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bt8qfu8dsd5n2"
path="res://.godot/imported/图层143.png-167f0d9aaf810030eacf9b7482ef1365.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://res/ui/ui_006_special_ability/图层143.png"
dest_files=["res://.godot/imported/图层143.png-167f0d9aaf810030eacf9b7482ef1365.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cyijswoxpmuvt"
path="res://.godot/imported/图层174.png-434b2e3039a3c171963c82581c83f4bf.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://res/ui/ui_006_special_ability/图层174.png"
dest_files=["res://.godot/imported/图层174.png-434b2e3039a3c171963c82581c83f4bf.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dg480s6q1t6by"
path="res://.godot/imported/图层230.png-b9e9f4cc2174c81fe2878d16373cb150.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://res/ui/ui_006_special_ability/图层230.png"
dest_files=["res://.godot/imported/图层230.png-b9e9f4cc2174c81fe2878d16373cb150.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://byn884lrilmrt"
path="res://.godot/imported/圆角矩形 4.png-727217c1f47663d0ced2b330b0a877db.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://res/ui/ui_006_special_ability/圆角矩形 4.png"
dest_files=["res://.godot/imported/圆角矩形 4.png-727217c1f47663d0ced2b330b0a877db.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

21
scene/ability_button.gd Normal file
View File

@ -0,0 +1,21 @@
extends Button
var show_mes:String=""
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_button_down() -> void:
modulate=Color(0.5,0.5,0.5,1)
pass # Replace with function body.
func _on_button_up() -> void:
modulate=Color(1,1,1,1)
pass # Replace with function body.

32
scene/ability_button.tscn Normal file
View File

@ -0,0 +1,32 @@
[gd_scene load_steps=5 format=3 uid="uid://dh00ritpv7tru"]
[ext_resource type="Texture2D" uid="uid://bt8qfu8dsd5n2" path="res://res/ui/ui_006_special_ability/图层143.png" id="1_s6y2q"]
[ext_resource type="Script" path="res://scene/ability_button.gd" id="2_owp7v"]
[ext_resource type="Texture2D" uid="uid://byn884lrilmrt" path="res://res/ui/ui_006_special_ability/圆角矩形 4.png" id="3_q82nx"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_hqj84"]
texture = ExtResource("3_q82nx")
texture_margin_left = 7.0
texture_margin_top = 7.0
texture_margin_right = 12.0
texture_margin_bottom = 13.0
[node name="TextureRect" type="Button"]
custom_minimum_size = Vector2(230, 58)
anchors_preset = -1
anchor_right = 0.119792
anchor_bottom = 0.0537037
tooltip_text = "kkkkkk"
icon = ExtResource("1_s6y2q")
flat = true
icon_alignment = 1
expand_icon = true
script = ExtResource("2_owp7v")
metadata/_edit_use_anchors_ = true
[node name="PopupPanel" type="PopupPanel" parent="."]
visible = true
theme_override_styles/panel = SubResource("StyleBoxTexture_hqj84")
[connection signal="button_down" from="." to="." method="_on_button_down"]
[connection signal="button_up" from="." to="." method="_on_button_up"]

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=23 format=3 uid="uid://33lcg23hy4mi"]
[gd_scene load_steps=24 format=3 uid="uid://33lcg23hy4mi"]
[ext_resource type="Script" path="res://scene/select.gd" id="1_cgnul"]
[ext_resource type="Texture2D" uid="uid://li8e5ntlgcpg" path="res://res/ui/ui_003_select/test.png" id="3_jw1jl"]
@ -18,6 +18,7 @@
[ext_resource type="Texture2D" uid="uid://y03c11caxq5g" path="res://res/ui/ui_003_select/末世图标.png" id="13_06h8p"]
[ext_resource type="Texture2D" uid="uid://cukrtaeu70hc5" path="res://res/ui/ui_003_select/继续图标.png" id="15_jcwu5"]
[ext_resource type="Texture2D" uid="uid://bt5qrcsynsp6j" path="res://res/ui/ui_004_character_bag/图层231.png" id="18_qwfod"]
[ext_resource type="Texture2D" uid="uid://bdnuk1oe6bhjv" path="res://res/ui/ui_003_select/图层29.png" id="19_ubknp"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ly4bd"]
resource_local_to_scene = true
@ -106,10 +107,10 @@ metadata/_edit_use_anchors_ = true
[node name="Button1" type="Button" parent="VBoxContainer"]
z_index = 1
clip_contents = true
custom_minimum_size = Vector2(385, 80)
custom_minimum_size = Vector2(385, 99)
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 3
size_flags_vertical = 0
focus_mode = 0
theme_override_styles/hover_pressed = ExtResource("4_7pqsv")
theme_override_styles/hover = ExtResource("4_7pqsv")
@ -133,10 +134,10 @@ stretch_mode = 6
[node name="Button2" type="Button" parent="VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(320, 80)
custom_minimum_size = Vector2(320, 99)
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 3
size_flags_vertical = 0
focus_mode = 0
theme_override_styles/hover_pressed = ExtResource("5_f0q5x")
theme_override_styles/hover = ExtResource("5_f0q5x")
@ -161,10 +162,10 @@ metadata/_edit_use_anchors_ = true
[node name="Button3" type="Button" parent="VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(320, 80)
custom_minimum_size = Vector2(320, 99)
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 3
size_flags_vertical = 0
focus_mode = 0
theme_override_styles/hover_pressed = ExtResource("5_f0q5x")
theme_override_styles/hover = ExtResource("5_f0q5x")
@ -189,10 +190,10 @@ metadata/_edit_use_anchors_ = true
[node name="Button4" type="Button" parent="VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(320, 80)
custom_minimum_size = Vector2(320, 99)
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 3
size_flags_vertical = 0
focus_mode = 0
theme_override_styles/hover_pressed = ExtResource("5_f0q5x")
theme_override_styles/hover = ExtResource("5_f0q5x")
@ -217,10 +218,10 @@ metadata/_edit_use_anchors_ = true
[node name="Button5" type="Button" parent="VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(320, 80)
custom_minimum_size = Vector2(320, 99)
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 3
size_flags_vertical = 0
focus_mode = 0
theme_override_styles/hover_pressed = ExtResource("5_f0q5x")
theme_override_styles/hover = ExtResource("5_f0q5x")
@ -245,10 +246,10 @@ metadata/_edit_use_anchors_ = true
[node name="Button6" type="Button" parent="VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(320, 80)
custom_minimum_size = Vector2(320, 99)
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 3
size_flags_vertical = 0
focus_mode = 0
theme_override_styles/hover_pressed = ExtResource("5_f0q5x")
theme_override_styles/hover = ExtResource("5_f0q5x")
@ -549,6 +550,49 @@ focus_mode = 0
icon = ExtResource("18_qwfod")
flat = true
[node name="TextureRect" type="NinePatchRect" parent="."]
z_index = 1
layout_mode = 0
anchor_left = 0.766146
anchor_top = 0.736111
anchor_right = 0.91875
anchor_bottom = 0.815741
texture = ExtResource("19_ubknp")
patch_margin_left = 30
patch_margin_right = 30
metadata/_edit_use_anchors_ = true
[node name="MarginContainer" type="MarginContainer" parent="TextureRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_right = 30
[node name="Label" type="Label" parent="TextureRect/MarginContainer"]
layout_mode = 2
size_flags_vertical = 1
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
theme_override_constants/outline_size = 28
theme_override_font_sizes/font_size = 45
text = "进入剧本"
horizontal_alignment = 1
vertical_alignment = 1
[node name="enter" type="Button" parent="TextureRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
focus_mode = 0
flat = true
[connection signal="pressed" from="VBoxContainer/Button1" to="." method="side_btn_clicked" binds= [0]]
[connection signal="pressed" from="VBoxContainer/Button2" to="." method="side_btn_clicked" binds= [1]]
[connection signal="pressed" from="VBoxContainer/Button3" to="." method="side_btn_clicked" binds= [2]]