mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-22 05:17:27 -04:00
gate info (wip)
This commit is contained in:
parent
d6add34302
commit
71b8d06c69
8 changed files with 379 additions and 155 deletions
55
app/scenes/components/gate_status.tscn
Normal file
55
app/scenes/components/gate_status.tscn
Normal file
|
@ -0,0 +1,55 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dr1hykfog1h85"]
|
||||
|
||||
[ext_resource type="LabelSettings" uid="uid://bo2334w4lf3ug" path="res://assets/styles/text.tres" id="1_gjtj0"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ydgjs"]
|
||||
bg_color = Color(0.431373, 0.435294, 0.494118, 1)
|
||||
corner_radius_top_left = 3
|
||||
corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 3
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_t3wmh"]
|
||||
bg_color = Color(0.32549, 0.14902, 0.8, 1)
|
||||
corner_radius_top_left = 3
|
||||
corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 3
|
||||
|
||||
[node name="GateStatus" type="Control"]
|
||||
custom_minimum_size = Vector2(0, 35)
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 512.0
|
||||
offset_bottom = 35.0
|
||||
|
||||
[node name="ProgressBarBackground" type="Panel" parent="."]
|
||||
custom_minimum_size = Vector2(0, 6)
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 6.0
|
||||
grow_horizontal = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_ydgjs")
|
||||
|
||||
[node name="ProgressBar" type="Panel" parent="."]
|
||||
custom_minimum_size = Vector2(0, 6)
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_right = -271.0
|
||||
offset_bottom = 6.0
|
||||
grow_horizontal = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_t3wmh")
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
text = "Downloading resources — 3Mb of 27 Mb (1Mb/sec)"
|
||||
label_settings = ExtResource("1_gjtj0")
|
|
@ -76,10 +76,10 @@ size_flags_horizontal = 3
|
|||
size_flags_vertical = 3
|
||||
theme_override_constants/margin_left = 0
|
||||
theme_override_constants/margin_top = 0
|
||||
theme_override_constants/margin_right = 0
|
||||
theme_override_constants/margin_right = 899
|
||||
theme_override_constants/margin_bottom = 0
|
||||
script = ExtResource("1_scp2i")
|
||||
limit = Vector2(1014, -1)
|
||||
limit = Vector2(1015, -1)
|
||||
halign = 0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/ScrollContainer/MaxSizeContainer"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=30 format=3 uid="uid://kywrsqro3d5i"]
|
||||
[gd_scene load_steps=40 format=3 uid="uid://kywrsqro3d5i"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/loading/gate_loader.gd" id="1_uxhy6"]
|
||||
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="2_q7cvi"]
|
||||
|
@ -18,11 +18,16 @@
|
|||
[ext_resource type="Script" path="res://scripts/ui/world/world_ui.gd" id="12_jdwjt"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/world/splash_screen.gd" id="13_3b6nd"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7571vjq7l0jp" path="res://scenes/components/not_responding.tscn" id="17_kwbm3"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/world/blackout.gd" id="18_776rt"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/world/gate_info.gd" id="18_q06xu"]
|
||||
[ext_resource type="Shader" uid="uid://dd1axtdlit6no" path="res://shaders/vignette_blur.tres" id="18_sat0u"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/fullscreen_animation.gd" id="18_sx3kr"]
|
||||
[ext_resource type="Texture2D" uid="uid://dapysvexbecnd" path="res://assets/textures/reload.svg" id="19_itbnl"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/world/rotate.gd" id="20_dsgqt"]
|
||||
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="19_tkqw6"]
|
||||
[ext_resource type="FontFile" uid="uid://bjeupg0ikc2kv" path="res://assets/fonts/Monospace.ttf" id="20_hoet7"]
|
||||
[ext_resource type="LabelSettings" uid="uid://crt4elt055uhg" path="res://assets/styles/text_big.tres" id="20_v1648"]
|
||||
[ext_resource type="FontFile" uid="uid://b3xb1fpllhnf4" path="res://assets/fonts/Inter-Italic.otf" id="21_lpegk"]
|
||||
[ext_resource type="FontFile" uid="uid://tfj3o1e1wytn" path="res://assets/fonts/Inter-BoldItalic.otf" id="22_i5khx"]
|
||||
[ext_resource type="FontFile" uid="uid://c14w1y1r54wgi" path="res://assets/fonts/Inter-Bold.otf" id="23_t1gqo"]
|
||||
[ext_resource type="PackedScene" uid="uid://dr1hykfog1h85" path="res://scenes/components/gate_status.tscn" id="25_3436m"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_be6ex"]
|
||||
resource_local_to_scene = true
|
||||
|
@ -30,8 +35,31 @@ shader = ExtResource("10_2auwe")
|
|||
shader_parameter/ext_texture_is_bgra = null
|
||||
shader_parameter/show_render = null
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ybg1t"]
|
||||
bg_color = Color(0, 0, 0, 0.470588)
|
||||
[sub_resource type="Curve" id="Curve_rju31"]
|
||||
_data = [Vector2(0.0702341, 1), 0.0, -0.118897, 0, 0, Vector2(0.270903, 0.720054), -3.7783, -3.7783, 0, 0, Vector2(0.444816, 0.308883), -1.03045, -1.03045, 0, 0, Vector2(1, 0.160161), 0.0, 0.0, 0, 0]
|
||||
point_count = 4
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_fomqh"]
|
||||
curve = SubResource("Curve_rju31")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_bspld"]
|
||||
shader = ExtResource("18_sat0u")
|
||||
shader_parameter/BlurAmount = 3.0
|
||||
shader_parameter/VignetteColor = Color(0.0137093, 0.00449686, 0.0741505, 1)
|
||||
shader_parameter/Vignette = SubResource("CurveTexture_fomqh")
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_axrau"]
|
||||
bg_color = Color(1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vnx4g"]
|
||||
bg_color = Color(0, 0, 0, 1)
|
||||
corner_radius_top_left = 25
|
||||
corner_radius_top_right = 25
|
||||
corner_radius_bottom_right = 25
|
||||
corner_radius_bottom_left = 25
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jiaac"]
|
||||
bg_color = Color(0, 0, 0, 0.2)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_beyyv"]
|
||||
length = 0.001
|
||||
|
@ -47,18 +75,6 @@ tracks/0/keys = {
|
|||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("WorldCanvas/Blackout:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_tper3"]
|
||||
resource_name = "fullscreen"
|
||||
|
@ -76,18 +92,6 @@ tracks/0/keys = {
|
|||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("WorldCanvas/Blackout:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.25),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_77flb"]
|
||||
resource_name = "initial"
|
||||
|
@ -105,18 +109,6 @@ tracks/0/keys = {
|
|||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("WorldCanvas/Blackout:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.25),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_sld6k"]
|
||||
_data = {
|
||||
|
@ -175,52 +167,6 @@ gate_events = ExtResource("2_q7cvi")
|
|||
command_events = ExtResource("6_18mgg")
|
||||
snbx_logger = NodePath("../SandboxLogger")
|
||||
|
||||
[node name="Loading" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Loading"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -40.0
|
||||
offset_top = -20.0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/separation = 12
|
||||
|
||||
[node name="Control" type="Control" parent="Loading/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Loading/HBoxContainer/Control"]
|
||||
self_modulate = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
pivot_offset = Vector2(12, 20)
|
||||
texture = ExtResource("19_itbnl")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
script = ExtResource("20_dsgqt")
|
||||
|
||||
[node name="Label" type="Label" parent="Loading/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Loading..."
|
||||
label_settings = ExtResource("20_v1648")
|
||||
|
||||
[node name="WorldCanvas" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
|
@ -233,21 +179,6 @@ script = ExtResource("9_ncfxj")
|
|||
ui_events = ExtResource("9_ir58h")
|
||||
interpolate = 1.0
|
||||
|
||||
[node name="SplashScreen" type="TextureRect" parent="WorldCanvas"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
script = ExtResource("13_3b6nd")
|
||||
gate_events = ExtResource("2_q7cvi")
|
||||
command_events = ExtResource("6_18mgg")
|
||||
ui_events = ExtResource("9_ir58h")
|
||||
|
||||
[node name="RenderResult" type="TextureRect" parent="WorldCanvas"]
|
||||
texture_filter = 2
|
||||
material = SubResource("ShaderMaterial_be6ex")
|
||||
|
@ -273,8 +204,7 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
focus_mode = 0
|
||||
|
||||
[node name="Blackout" type="Panel" parent="WorldCanvas"]
|
||||
visible = false
|
||||
[node name="Foreground" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
|
@ -282,9 +212,113 @@ anchor_bottom = 1.0
|
|||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_ybg1t")
|
||||
script = ExtResource("18_776rt")
|
||||
|
||||
[node name="SplashScreen" type="TextureRect" parent="Foreground" node_paths=PackedStringArray("render_result")]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
expand_mode = 1
|
||||
stretch_mode = 6
|
||||
script = ExtResource("13_3b6nd")
|
||||
gate_events = ExtResource("2_q7cvi")
|
||||
command_events = ExtResource("6_18mgg")
|
||||
ui_events = ExtResource("9_ir58h")
|
||||
render_result = NodePath("../../WorldCanvas/RenderResult")
|
||||
|
||||
[node name="VignetteBlur" type="Panel" parent="Foreground"]
|
||||
material = SubResource("ShaderMaterial_bspld")
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_axrau")
|
||||
|
||||
[node name="GateInfo" type="VBoxContainer" parent="Foreground" node_paths=PackedStringArray("image", "title", "description")]
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 50.0
|
||||
offset_top = -90.0
|
||||
offset_right = 562.0
|
||||
offset_bottom = -50.0
|
||||
grow_vertical = 0
|
||||
mouse_filter = 2
|
||||
theme_override_constants/separation = 12
|
||||
alignment = 2
|
||||
script = ExtResource("18_q06xu")
|
||||
gate_events = ExtResource("2_q7cvi")
|
||||
image = NodePath("Image/TextureRect")
|
||||
title = NodePath("Title")
|
||||
description = NodePath("RichTextLabel")
|
||||
|
||||
[node name="Image" type="Panel" parent="Foreground/GateInfo"]
|
||||
clip_children = 1
|
||||
custom_minimum_size = Vector2(0, 256)
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_vnx4g")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Foreground/GateInfo/Image"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
expand_mode = 1
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="Panel" type="Panel" parent="Foreground/GateInfo/Image"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_jiaac")
|
||||
|
||||
[node name="Space" type="Control" parent="Foreground/GateInfo"]
|
||||
custom_minimum_size = Vector2(0, 6)
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Title" type="Label" parent="Foreground/GateInfo"]
|
||||
layout_mode = 2
|
||||
text = "Welcome"
|
||||
label_settings = ExtResource("20_v1648")
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="Foreground/GateInfo"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/default_color = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
theme_override_colors/selection_color = Color(0.419608, 0.231373, 0.929412, 0.588235)
|
||||
theme_override_fonts/normal_font = ExtResource("19_tkqw6")
|
||||
theme_override_fonts/mono_font = ExtResource("20_hoet7")
|
||||
theme_override_fonts/italics_font = ExtResource("21_lpegk")
|
||||
theme_override_fonts/bold_italics_font = ExtResource("22_i5khx")
|
||||
theme_override_fonts/bold_font = ExtResource("23_t1gqo")
|
||||
theme_override_font_sizes/bold_italics_font_size = 15
|
||||
theme_override_font_sizes/italics_font_size = 15
|
||||
theme_override_font_sizes/mono_font_size = 15
|
||||
theme_override_font_sizes/normal_font_size = 15
|
||||
theme_override_font_sizes/bold_font_size = 15
|
||||
bbcode_enabled = true
|
||||
text = "A slot machine battler instead of money its points that you can use to heal and attack. upgrade your build and attack enemies and become the best on the leaderboard"
|
||||
fit_content = true
|
||||
|
||||
[node name="Space2" type="Control" parent="Foreground/GateInfo"]
|
||||
custom_minimum_size = Vector2(0, 26)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="GateStatus" parent="Foreground/GateInfo" instance=ExtResource("25_3436m")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
|
|
|
@ -21,10 +21,10 @@ func search(query: String) -> void:
|
|||
return
|
||||
|
||||
for gate in gates:
|
||||
Debug.logr(gate["url"])
|
||||
var result: SearchResult = result_scene.instantiate()
|
||||
result.fill(gate)
|
||||
add_child(result)
|
||||
Debug.logr(gate["url"])
|
||||
|
||||
|
||||
func search_request(query: String) -> void:
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
extends Panel
|
||||
|
||||
@export var gate_events: GateEvents
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
gate_events.first_frame.connect(func(): visible = true)
|
|
@ -1,6 +0,0 @@
|
|||
extends TextureRect
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
var tween = create_tween().set_loops()
|
||||
tween.tween_property(self, "rotation", 360, 50).from(0)
|
|
@ -4,40 +4,14 @@ class_name SplashScreen
|
|||
@export var gate_events: GateEvents
|
||||
@export var command_events: CommandEvents
|
||||
@export var ui_events: UiEvents
|
||||
@export var splash_screen: Texture2D
|
||||
|
||||
@onready var width: int = int(size.x)
|
||||
@onready var height: int = int(size.y)
|
||||
@export var render_result: RenderResult
|
||||
|
||||
|
||||
#func _ready():
|
||||
#gate_events.gate_info_loaded.connect(show_thumbnail)
|
||||
#gate_events.gate_entered.connect(show_splash_screen)
|
||||
func _ready():
|
||||
gate_events.gate_info_loaded.connect(show_thumbnail)
|
||||
#gate_events.first_frame.connect(func(): hide())
|
||||
#
|
||||
## Change size
|
||||
#show_splash_screen()
|
||||
|
||||
|
||||
func show_thumbnail(gate: Gate, is_cached: bool) -> void:
|
||||
if is_cached: return # Resource pack is already downloaded
|
||||
|
||||
var image: Image
|
||||
var tex = FileTools.load_external_tex(gate.image)
|
||||
|
||||
if tex != null: image = resize_and_convert(tex.get_image(), Image.FORMAT_RGB8)
|
||||
else: image = Image.create(width, height, false, Image.FORMAT_RGB8)
|
||||
|
||||
self.texture = ImageTexture.create_from_image(image)
|
||||
|
||||
|
||||
func show_splash_screen() -> void:
|
||||
var image = resize_and_convert(splash_screen.get_image(), Image.FORMAT_RGBA8)
|
||||
self.texture = ImageTexture.create_from_image(image)
|
||||
|
||||
|
||||
func resize_and_convert(image: Image, format: Image.Format) -> Image:
|
||||
image.resize(width, height)
|
||||
image.convert(format)
|
||||
#image.clear_mipmaps()
|
||||
return image
|
||||
func show_thumbnail(gate: Gate, _is_cached: bool) -> void:
|
||||
#if is_cached: return # Resource pack is already downloaded
|
||||
texture = FileTools.load_external_tex(gate.image)
|
||||
|
|
174
app/shaders/vignette_blur.tres
Normal file
174
app/shaders/vignette_blur.tres
Normal file
|
@ -0,0 +1,174 @@
|
|||
[gd_resource type="VisualShader" load_steps=16 format=3 uid="uid://dd1axtdlit6no"]
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_t1tvu"]
|
||||
parameter_name = "Vignette"
|
||||
texture_filter = 4
|
||||
texture_repeat = 1
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_qsusy"]
|
||||
source = 5
|
||||
|
||||
[sub_resource type="VisualShaderNodeMultiplyAdd" id="VisualShaderNodeMultiplyAdd_e4whf"]
|
||||
|
||||
[sub_resource type="VisualShaderNodeVec2Constant" id="VisualShaderNodeVec2Constant_4drcy"]
|
||||
constant = Vector2(0.1, 0)
|
||||
|
||||
[sub_resource type="VisualShaderNodeUVPolarCoord" id="VisualShaderNodeUVPolarCoord_0o2bh"]
|
||||
default_input_values = [1, Vector2(0.5, 0.5), 2, 0.5, 3, 1.0]
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_juddb"]
|
||||
parameter_name = "VignetteColor"
|
||||
|
||||
[sub_resource type="VisualShaderNodeUVFunc" id="VisualShaderNodeUVFunc_1ddw1"]
|
||||
default_input_values = [1, Vector2(0.9, 0.9), 2, Vector2(0.5, 0.5)]
|
||||
function = 1
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_w3k0x"]
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_0a06v"]
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_g3bno"]
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_4s8mp"]
|
||||
default_input_values = [0, Vector3(1, 1, 1), 1, Vector3(-1, -1, 0)]
|
||||
operator = 1
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_24i63"]
|
||||
input_name = "screen_uv"
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_le3j7"]
|
||||
source = 5
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_u0lfa"]
|
||||
parameter_name = "ScreenTexture"
|
||||
texture_filter = 4
|
||||
texture_source = 1
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatParameter" id="VisualShaderNodeFloatParameter_383fa"]
|
||||
parameter_name = "BlurAmount"
|
||||
hint = 2
|
||||
max = 5.0
|
||||
|
||||
[resource]
|
||||
code = "shader_type canvas_item;
|
||||
render_mode blend_disabled;
|
||||
|
||||
uniform float BlurAmount : hint_range(0, 5, 0.10000000149012);
|
||||
uniform sampler2D ScreenTexture : filter_linear_mipmap, hint_screen_texture;
|
||||
uniform sampler2D Vignette : filter_linear_mipmap, repeat_enable;
|
||||
uniform vec4 VignetteColor : source_color;
|
||||
|
||||
|
||||
|
||||
void fragment() {
|
||||
// Input:4
|
||||
vec2 n_out4p0 = SCREEN_UV;
|
||||
|
||||
|
||||
// UVFunc:21
|
||||
vec2 n_in21p1 = vec2(0.90000, 0.90000);
|
||||
vec2 n_in21p2 = vec2(0.50000, 0.50000);
|
||||
vec2 n_out21p0 = (n_out4p0 - n_in21p2) * n_in21p1 + n_in21p2;
|
||||
|
||||
|
||||
// FloatParameter:9
|
||||
float n_out9p0 = BlurAmount;
|
||||
|
||||
|
||||
vec4 n_out7p0;
|
||||
// Texture2D:7
|
||||
n_out7p0 = textureLod(ScreenTexture, n_out21p0, n_out9p0);
|
||||
|
||||
|
||||
vec2 n_out18p0;
|
||||
// UVPolarCoord:18
|
||||
vec2 n_in18p1 = vec2(0.50000, 0.50000);
|
||||
float n_in18p2 = 0.50000;
|
||||
float n_in18p3 = 1.00000;
|
||||
{
|
||||
vec2 __dir = UV - n_in18p1;
|
||||
float __radius = length(__dir) * 2.0;
|
||||
float __angle = atan(__dir.y, __dir.x) * 1.0 / (PI * 2.0);
|
||||
n_out18p0 = mod(vec2(__radius * n_in18p2, __angle * n_in18p3), 1.0);
|
||||
}
|
||||
|
||||
|
||||
// Vector2Constant:16
|
||||
vec2 n_out16p0 = vec2(0.100000, 0.000000);
|
||||
|
||||
|
||||
// MultiplyAdd:15
|
||||
float n_in15p1 = 1.00000;
|
||||
float n_out15p0 = fma(n_out18p0.x, n_in15p1, n_out16p0.x);
|
||||
|
||||
|
||||
vec4 n_out11p0;
|
||||
// Texture2D:11
|
||||
n_out11p0 = texture(Vignette, vec2(n_out15p0));
|
||||
|
||||
|
||||
// VectorOp:26
|
||||
vec3 n_in26p0 = vec3(1.00000, 1.00000, 1.00000);
|
||||
vec3 n_out26p0 = n_in26p0 - vec3(n_out11p0.xyz);
|
||||
|
||||
|
||||
// ColorParameter:20
|
||||
vec4 n_out20p0 = VignetteColor;
|
||||
|
||||
|
||||
// VectorOp:25
|
||||
vec3 n_out25p0 = n_out26p0 * vec3(n_out20p0.xyz);
|
||||
|
||||
|
||||
// VectorOp:23
|
||||
vec3 n_out23p0 = vec3(n_out11p0.xyz) + n_out25p0;
|
||||
|
||||
|
||||
// VectorOp:24
|
||||
vec3 n_out24p0 = vec3(n_out7p0.xyz) * n_out23p0;
|
||||
|
||||
|
||||
// Output:0
|
||||
COLOR.rgb = n_out24p0;
|
||||
|
||||
|
||||
}
|
||||
"
|
||||
graph_offset = Vector2(-281.758, 131.259)
|
||||
mode = 1
|
||||
modes/blend = 5
|
||||
flags/light_only = false
|
||||
nodes/fragment/0/position = Vector2(680, 160)
|
||||
nodes/fragment/4/node = SubResource("VisualShaderNodeInput_24i63")
|
||||
nodes/fragment/4/position = Vector2(-480, -540)
|
||||
nodes/fragment/7/node = SubResource("VisualShaderNodeTexture_le3j7")
|
||||
nodes/fragment/7/position = Vector2(20, 40)
|
||||
nodes/fragment/8/node = SubResource("VisualShaderNodeTexture2DParameter_u0lfa")
|
||||
nodes/fragment/8/position = Vector2(-480, -120)
|
||||
nodes/fragment/9/node = SubResource("VisualShaderNodeFloatParameter_383fa")
|
||||
nodes/fragment/9/position = Vector2(-420, -440)
|
||||
nodes/fragment/10/node = SubResource("VisualShaderNodeTexture2DParameter_t1tvu")
|
||||
nodes/fragment/10/position = Vector2(-980, 560)
|
||||
nodes/fragment/11/node = SubResource("VisualShaderNodeTexture_qsusy")
|
||||
nodes/fragment/11/position = Vector2(-500, 440)
|
||||
nodes/fragment/15/node = SubResource("VisualShaderNodeMultiplyAdd_e4whf")
|
||||
nodes/fragment/15/position = Vector2(-840, 320)
|
||||
nodes/fragment/16/node = SubResource("VisualShaderNodeVec2Constant_4drcy")
|
||||
nodes/fragment/16/position = Vector2(-1080, 400)
|
||||
nodes/fragment/18/node = SubResource("VisualShaderNodeUVPolarCoord_0o2bh")
|
||||
nodes/fragment/18/position = Vector2(-1120, 200)
|
||||
nodes/fragment/20/node = SubResource("VisualShaderNodeColorParameter_juddb")
|
||||
nodes/fragment/20/position = Vector2(-400, 860)
|
||||
nodes/fragment/21/node = SubResource("VisualShaderNodeUVFunc_1ddw1")
|
||||
nodes/fragment/21/position = Vector2(-20, -500)
|
||||
nodes/fragment/23/node = SubResource("VisualShaderNodeVectorOp_w3k0x")
|
||||
nodes/fragment/23/position = Vector2(180, 420)
|
||||
nodes/fragment/24/node = SubResource("VisualShaderNodeVectorOp_0a06v")
|
||||
nodes/fragment/24/position = Vector2(400, 180)
|
||||
nodes/fragment/25/node = SubResource("VisualShaderNodeVectorOp_g3bno")
|
||||
nodes/fragment/25/position = Vector2(0, 660)
|
||||
nodes/fragment/26/node = SubResource("VisualShaderNodeVectorOp_4s8mp")
|
||||
nodes/fragment/26/position = Vector2(-260, 600)
|
||||
nodes/fragment/connections = PackedInt32Array(8, 0, 7, 2, 9, 0, 7, 1, 10, 0, 11, 2, 15, 0, 11, 0, 16, 0, 15, 2, 18, 0, 15, 0, 4, 0, 21, 0, 11, 0, 23, 0, 7, 0, 24, 0, 25, 0, 23, 1, 20, 0, 25, 1, 26, 0, 25, 0, 11, 0, 26, 1, 23, 0, 24, 1, 24, 0, 0, 0, 21, 0, 7, 0)
|
Loading…
Add table
Add a link
Reference in a new issue