diff --git a/scenes/dev/grapple/custom_hookable_objects/custom_hookable_objects_test.tscn b/scenes/dev/grapple/custom_hookable_objects/custom_hookable_objects_test.tscn index 33d88e3f0..bbec73d75 100644 --- a/scenes/dev/grapple/custom_hookable_objects/custom_hookable_objects_test.tscn +++ b/scenes/dev/grapple/custom_hookable_objects/custom_hookable_objects_test.tscn @@ -6,7 +6,10 @@ [ext_resource type="TileSet" uid="uid://b8qnr0owsbhhn" path="res://tiles/exterior_floors.tres" id="5_717he"] [ext_resource type="TileSet" uid="uid://do0ffypatd77h" path="res://tiles/bridges.tres" id="6_obhrw"] [ext_resource type="TileSet" uid="uid://41pk6xbhypue" path="res://tiles/fence.tres" id="7_5lu30"] +[ext_resource type="Shader" uid="uid://dui35fhf12sp5" path="res://scenes/game_elements/fx/world_rewoven/components/world_rewoven.gdshader" id="7_mwlmc"] [ext_resource type="PackedScene" uid="uid://iu2q66clupc6" path="res://scenes/game_elements/characters/player/player.tscn" id="8_2l846"] +[ext_resource type="Texture2D" uid="uid://drlsbgxh5e6vv" path="res://scenes/game_elements/fx/world_rewoven/components/fabric_texture.png" id="8_50s3p"] +[ext_resource type="Script" uid="uid://dpw8lcjx68p3o" path="res://scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd" id="8_ssbsc"] [ext_resource type="SpriteFrames" uid="uid://cxjwwgm86d6it" path="res://scenes/game_elements/characters/components/sprite_frames/storyweaver_red.tres" id="9_powm1"] [ext_resource type="PackedScene" uid="uid://dkpelgxwtvcxd" path="res://scenes/game_elements/props/hookable_box/hookable_box.tscn" id="11_b1u67"] [ext_resource type="PackedScene" uid="uid://d37mebu7atru7" path="res://scenes/game_elements/characters/enemies/guard/guard.tscn" id="13_rna1f"] @@ -21,6 +24,29 @@ [ext_resource type="Script" uid="uid://dnp0tjloec2d7" path="res://scenes/game_logic/stealth_game_logic.gd" id="20_rna1f"] [ext_resource type="Script" uid="uid://c5jp8y8mpge4w" path="res://scenes/game_elements/props/toggleable_tile_map_layer/toggleable_tile_map_layer.gd" id="20_tbxxm"] +[sub_resource type="Gradient" id="Gradient_lq5qh"] +colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_au3ml"] +gradient = SubResource("Gradient_lq5qh") +fill_from = Vector2(0, 1) +fill_to = Vector2(0, 0) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_5hkkv"] +shader = ExtResource("7_mwlmc") +shader_parameter/mask_texture = SubResource("GradientTexture2D_au3ml") +shader_parameter/mask_origin = Vector2(896, 128) +shader_parameter/mask_size = Vector2(128, 448) +shader_parameter/fabric_texture = ExtResource("8_50s3p") +shader_parameter/fabric_scale = 1.0 +shader_parameter/progress = 1.0 +shader_parameter/target_canvas_group = false +shader_parameter/smoothness = 0.250000011875 +shader_parameter/burn_size = 0.250000011875 +shader_parameter/burn_color = Color(1.353, 1.353, 0.777, 1) +shader_parameter/canvas_modulate = Color(0.481789, 0.48179, 0.481789, 1) +shader_parameter/gray_intensity = 0.0 + [sub_resource type="Gradient" id="Gradient_5j6h7"] interpolation_mode = 2 interpolation_color_space = 2 @@ -84,8 +110,15 @@ tile_map_data = PackedByteArray("AAACAAMAAAAAAAAAAAADAAMAAAABAAIAAAAEAAMAAAABAAI tile_set = ExtResource("7_5lu30") [node name="FenceDoor" type="TileMapLayer" parent="TileMapLayers" unique_id=1123335364] +material = SubResource("ShaderMaterial_5hkkv") tile_map_data = PackedByteArray("AAAHAAQAAAADAAEAAAAHAAUAAAACAAEAAAAHAAYAAAADAAIAAAA=") tile_set = ExtResource("7_5lu30") +script = ExtResource("20_tbxxm") + +[node name="TileMapMaskBounds" type="Node" parent="TileMapLayers/FenceDoor" unique_id=1792441067 node_paths=PackedStringArray("canvas_item")] +script = ExtResource("8_ssbsc") +canvas_item = NodePath("..") +metadata/_custom_type_script = "uid://dpw8lcjx68p3o" [node name="OnTheGround" type="Node2D" parent="." unique_id=888515986] y_sort_enabled = true @@ -107,7 +140,7 @@ constrain_layer = NodePath("../../TileMapLayers/Paths") [node name="HookableLever" parent="OnTheGround" unique_id=653701664 node_paths=PackedStringArray("targets") instance=ExtResource("14_esoiq")] position = Vector2(703, 448) -targets = [NodePath("../../ToggleableTileMapLayer")] +targets = [NodePath("../../TileMapLayers/FenceDoor")] [node name="HookableNeedle" parent="OnTheGround" unique_id=1182662384 instance=ExtResource("15_bhn5g")] position = Vector2(64, 96) @@ -270,11 +303,6 @@ alert_others_sound_stream = ExtResource("18_obhrw") position = Vector2(207, 349.042) curve = SubResource("Curve2D_rna1f") -[node name="ToggleableTileMapLayer" type="Node2D" parent="." unique_id=374995496 node_paths=PackedStringArray("target")] -script = ExtResource("20_tbxxm") -target = NodePath("../TileMapLayers/FenceDoor") -metadata/_custom_type_script = "uid://c5jp8y8mpge4w" - [node name="ScreenOverlay" type="CanvasLayer" parent="." unique_id=789862376] [node name="CanvasModulate" type="CanvasModulate" parent="." unique_id=1807394969] diff --git a/scenes/dev/grapple/grapple_gym_2/grapple_gym_2.gd b/scenes/dev/grapple/grapple_gym_2/grapple_gym_2.gd index 5104fc9b4..4ca098b2a 100644 --- a/scenes/dev/grapple/grapple_gym_2/grapple_gym_2.gd +++ b/scenes/dev/grapple/grapple_gym_2/grapple_gym_2.gd @@ -5,9 +5,11 @@ extends Node2D var zoom_tween: Tween @onready var camera_2d: Camera2D = %Camera2D +@onready var bridges_unlocked: ToggleableTileMapLayer = %BridgesUnlocked func _ready() -> void: + bridges_unlocked.initialize_with_value(false) GameState.player.abilities_changed.connect(_on_abilities_changed) _on_abilities_changed() diff --git a/scenes/dev/grapple/grapple_gym_2/grapple_gym_2.tscn b/scenes/dev/grapple/grapple_gym_2/grapple_gym_2.tscn index ca5363347..d88c8ea25 100644 --- a/scenes/dev/grapple/grapple_gym_2/grapple_gym_2.tscn +++ b/scenes/dev/grapple/grapple_gym_2/grapple_gym_2.tscn @@ -12,7 +12,10 @@ [ext_resource type="SpriteFrames" uid="uid://cfgahyntmtfgu" path="res://scenes/game_elements/props/powerup/components/powerup_thread.tres" id="4_xhlcu"] [ext_resource type="PackedScene" uid="uid://evb46lm6ssu2" path="res://scenes/game_elements/props/hookable_pin/hookable_pin.tscn" id="5_t21wp"] [ext_resource type="Script" uid="uid://c5jp8y8mpge4w" path="res://scenes/game_elements/props/toggleable_tile_map_layer/toggleable_tile_map_layer.gd" id="7_3w461"] +[ext_resource type="Shader" uid="uid://dui35fhf12sp5" path="res://scenes/game_elements/fx/world_rewoven/components/world_rewoven.gdshader" id="8_k57dq"] +[ext_resource type="Texture2D" uid="uid://drlsbgxh5e6vv" path="res://scenes/game_elements/fx/world_rewoven/components/fabric_texture.png" id="9_6pxnx"] [ext_resource type="PackedScene" uid="uid://covsdqqsd6rsy" path="res://scenes/game_elements/props/sign/sign.tscn" id="9_ctt8w"] +[ext_resource type="Script" uid="uid://dpw8lcjx68p3o" path="res://scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd" id="10_woov4"] [ext_resource type="PackedScene" uid="uid://dohb701lxbe5s" path="res://scenes/game_elements/props/hookable_needle/hookable_needle.tscn" id="14_5qe2l"] [ext_resource type="PackedScene" uid="uid://cvtty6np3dcv4" path="res://scenes/game_elements/props/all_hooked/all_hooked.tscn" id="15_0xn1s"] [ext_resource type="PackedScene" uid="uid://d0c4l7ev6ca3c" path="res://scenes/game_elements/props/spawn_point/spawn_point.tscn" id="15_qjdbk"] @@ -27,6 +30,27 @@ [ext_resource type="PackedScene" uid="uid://cfvr32bp2achm" path="res://scenes/game_elements/props/decoration/rock/fabric_rock.tscn" id="24_j21no"] [ext_resource type="PackedScene" uid="uid://dttyvh6kyru5y" path="res://scenes/game_elements/props/decoration/butterfly/butterfly.tscn" id="25_3a52b"] +[sub_resource type="Gradient" id="Gradient_wymun"] +colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_7vm8y"] +gradient = SubResource("Gradient_wymun") + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_kjrmi"] +shader = ExtResource("8_k57dq") +shader_parameter/mask_texture = SubResource("GradientTexture2D_7vm8y") +shader_parameter/mask_origin = Vector2(1024, -1344) +shader_parameter/mask_size = Vector2(576, 64) +shader_parameter/fabric_texture = ExtResource("9_6pxnx") +shader_parameter/fabric_scale = 1.0 +shader_parameter/progress = 1.0 +shader_parameter/target_canvas_group = false +shader_parameter/smoothness = 0.3230000153425 +shader_parameter/burn_size = 0.3430000162925 +shader_parameter/burn_color = Color(1.353, 1.353, 0.777, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) +shader_parameter/gray_intensity = 0.0 + [node name="GrappleGym2" type="Node2D" unique_id=129556927] script = ExtResource("1_4arhg") @@ -59,10 +83,17 @@ tile_map_data = PackedByteArray("AAALAAAAAwAAAAMAAAALAP//AwAAAAIAAAALAP7/AwAAAAI tile_set = ExtResource("3_75dn2") [node name="BridgesUnlocked" type="TileMapLayer" parent="TileMapLayers" unique_id=1341990576] +unique_name_in_owner = true +material = SubResource("ShaderMaterial_kjrmi") tile_map_data = PackedByteArray("AAAQAOv/AwAAAAAAAAARAOv/AwABAAAAAAASAOv/AwABAAAAAAATAOv/AwABAAAAAAAUAOv/AwABAAAAAAAVAOv/AwABAAAAAAAWAOv/AwABAAAAAAAXAOv/AwABAAAAAAAYAOv/AwACAAAAAAA=") -enabled = false tile_set = ExtResource("3_75dn2") script = ExtResource("7_3w461") +invert = true + +[node name="TileMapMaskBounds" type="Node" parent="TileMapLayers/BridgesUnlocked" unique_id=448833223 node_paths=PackedStringArray("canvas_item")] +script = ExtResource("10_woov4") +canvas_item = NodePath("..") +metadata/_custom_type_script = "uid://dpw8lcjx68p3o" [node name="OnTheGround" type="Node2D" parent="." unique_id=1706163952] y_sort_enabled = true @@ -485,4 +516,4 @@ position = Vector2(1336, 48) position = Vector2(-158, 1375) [connection signal="all_hooked" from="OnTheGround/AllHooked" to="TileMapLayers/WaterUnlocked" method="set_toggled" binds= [false]] -[connection signal="all_hooked" from="OnTheGround/AllHooked" to="TileMapLayers/BridgesUnlocked" method="set_toggled" binds= [false]] +[connection signal="all_hooked" from="OnTheGround/AllHooked" to="TileMapLayers/BridgesUnlocked" method="set_toggled" binds= [true]] diff --git a/scenes/dev/repel/custom_repellable_objects/custom_repellable_objects_test.tscn b/scenes/dev/repel/custom_repellable_objects/custom_repellable_objects_test.tscn index 526fd8353..deb883b7c 100644 --- a/scenes/dev/repel/custom_repellable_objects/custom_repellable_objects_test.tscn +++ b/scenes/dev/repel/custom_repellable_objects/custom_repellable_objects_test.tscn @@ -7,9 +7,12 @@ [ext_resource type="TileSet" uid="uid://b8qnr0owsbhhn" path="res://tiles/exterior_floors.tres" id="5_o0gav"] [ext_resource type="TileSet" uid="uid://do0ffypatd77h" path="res://tiles/bridges.tres" id="6_743bw"] [ext_resource type="TileSet" uid="uid://41pk6xbhypue" path="res://tiles/fence.tres" id="7_thbog"] +[ext_resource type="Shader" uid="uid://dui35fhf12sp5" path="res://scenes/game_elements/fx/world_rewoven/components/world_rewoven.gdshader" id="8_4mh5g"] [ext_resource type="PackedScene" uid="uid://iu2q66clupc6" path="res://scenes/game_elements/characters/player/player.tscn" id="8_d53c5"] [ext_resource type="SpriteFrames" uid="uid://cxjwwgm86d6it" path="res://scenes/game_elements/characters/components/sprite_frames/storyweaver_red.tres" id="9_qo67l"] +[ext_resource type="Texture2D" uid="uid://drlsbgxh5e6vv" path="res://scenes/game_elements/fx/world_rewoven/components/fabric_texture.png" id="9_rxnop"] [ext_resource type="PackedScene" uid="uid://dqo4d6mp4hwhi" path="res://scenes/game_elements/props/repellable_box/repellable_box.tscn" id="10_s3xwn"] +[ext_resource type="Script" uid="uid://dpw8lcjx68p3o" path="res://scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd" id="11_au3ml"] [ext_resource type="PackedScene" uid="uid://w50y4sa4xay2" path="res://scenes/game_elements/props/repellable_ball/repellable_ball.tscn" id="11_uqwf7"] [ext_resource type="PackedScene" uid="uid://cuu65vogubwxd" path="res://scenes/game_elements/props/repellable_lever/repellable_lever.tscn" id="12_576oi"] [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="13_rqpd2"] @@ -18,6 +21,30 @@ [ext_resource type="PackedScene" uid="uid://cl06pid826dtg" path="res://scenes/game_elements/characters/player/components/player_repel.tscn" id="16_bya72"] [ext_resource type="Script" uid="uid://c5jp8y8mpge4w" path="res://scenes/game_elements/props/toggleable_tile_map_layer/toggleable_tile_map_layer.gd" id="17_xwlxp"] +[sub_resource type="Gradient" id="Gradient_lq5qh"] +colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_au3ml"] +gradient = SubResource("Gradient_lq5qh") +fill = 1 +fill_from = Vector2(0.5, 0.5) +fill_to = Vector2(0, 0) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_fhnvg"] +shader = ExtResource("8_4mh5g") +shader_parameter/mask_texture = SubResource("GradientTexture2D_au3ml") +shader_parameter/mask_origin = Vector2(896, 192) +shader_parameter/mask_size = Vector2(128, 320) +shader_parameter/fabric_texture = ExtResource("9_rxnop") +shader_parameter/fabric_scale = 1.0 +shader_parameter/progress = 0.5990000284525 +shader_parameter/target_canvas_group = false +shader_parameter/smoothness = 1.0 +shader_parameter/burn_size = 1.0 +shader_parameter/burn_color = Color(1.353, 1.353, 0.777, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) +shader_parameter/gray_intensity = 0.0 + [node name="CustomRepellableObjectsTest" type="Node2D" unique_id=324172432] script = ExtResource("1_hfxxd") @@ -50,12 +77,18 @@ tile_map_data = PackedByteArray("AAAGAAkAAwAAAAEAAAAGAAoAAwAAAAIAAAAGAAsAAwAAAAI tile_set = ExtResource("6_743bw") [node name="Fence" type="TileMapLayer" parent="TileMapLayers" unique_id=1482788515] -tile_map_data = PackedByteArray("AAAPAAcAAAACAAEAAAASAAcAAAAAAAEAAAASAAYAAAAAAAEAAAASAAUAAAACAAEAAAASAAQAAAACAAEAAAASAAMAAAACAAEAAAAPAAMAAAAAAAEAAAAPAAIAAAAAAAAAAAAQAAIAAAABAAAAAAARAAIAAAABAAAAAAASAAIAAAACAAAAAAAPAAgAAAAAAAIAAAAQAAgAAAABAAIAAAARAAgAAAABAAIAAAASAAgAAAACAAIAAAAPAAQAAAADAAIAAAAPAAYAAAADAAEAAAA=") +tile_map_data = PackedByteArray("AAAPAAcAAAADAAEAAAASAAcAAAAAAAEAAAASAAYAAAAAAAEAAAASAAUAAAACAAEAAAASAAQAAAACAAEAAAASAAMAAAACAAEAAAAPAAMAAAADAAIAAAAPAAIAAAAAAAAAAAAQAAIAAAABAAAAAAARAAIAAAABAAAAAAASAAIAAAACAAAAAAAPAAgAAAAAAAIAAAAQAAgAAAABAAIAAAARAAgAAAABAAIAAAASAAgAAAACAAIAAAA=") tile_set = ExtResource("7_thbog") -[node name="FenceDoor" type="TileMapLayer" parent="TileMapLayers" unique_id=1123335364] -tile_map_data = PackedByteArray("AAAPAAQAAAAEAAAAAAAOAAQAAAAAAAAAAAAOAAYAAAAAAAIAAAAPAAYAAAAEAAAAAAAOAAUAAAAAAAEAAAA=") +[node name="FenceDoorClosed" type="TileMapLayer" parent="TileMapLayers" unique_id=1123335364] +material = SubResource("ShaderMaterial_fhnvg") +tile_map_data = PackedByteArray("AAAOAAQAAAACAAEAAAAOAAYAAAAAAAEAAAAOAAUAAAAAAAEAAAAOAAMAAAAAAAAAAAAPAAMAAAAEAAAAAAAOAAcAAAAAAAIAAAAPAAcAAAAEAAAAAAA=") tile_set = ExtResource("7_thbog") +script = ExtResource("17_xwlxp") + +[node name="TileMapMaskBounds" type="Node" parent="TileMapLayers/FenceDoorClosed" unique_id=203908000 node_paths=PackedStringArray("canvas_item")] +script = ExtResource("11_au3ml") +canvas_item = NodePath("..") [node name="OnTheGround" type="Node2D" parent="." unique_id=888515986] y_sort_enabled = true @@ -100,7 +133,7 @@ position = Vector2(512, 1088) [node name="RepellableLever" parent="OnTheGround" unique_id=37452001 node_paths=PackedStringArray("targets") instance=ExtResource("12_576oi")] position = Vector2(726, 107) -targets = [NodePath("../../ToggleableTileMapLayer")] +targets = [NodePath("../../TileMapLayers/FenceDoorClosed")] [node name="RepellableLever2" parent="OnTheGround" unique_id=632125149 instance=ExtResource("12_576oi")] position = Vector2(1090, 614) @@ -176,11 +209,6 @@ player_controlled = false unique_name_in_owner = true wait_time = 1.5 -[node name="ToggleableTileMapLayer" type="Node2D" parent="." unique_id=374995496 node_paths=PackedStringArray("target")] -script = ExtResource("17_xwlxp") -target = NodePath("../TileMapLayers/FenceDoor") -metadata/_custom_type_script = "uid://c5jp8y8mpge4w" - [node name="ScreenOverlay" type="CanvasLayer" parent="." unique_id=789862376] [connection signal="toggled" from="OnTheGround/RepellableLever2" to="." method="_on_repellable_lever_2_toggled"] diff --git a/scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd b/scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd new file mode 100644 index 000000000..3e7dc1c2b --- /dev/null +++ b/scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd @@ -0,0 +1,105 @@ +# SPDX-FileCopyrightText: The Threadbare Authors +# SPDX-License-Identifier: MPL-2.0 +@tool +class_name TileMapMaskBounds +extends BaseCanvasItemBehavior +## Feeds the bounds of a set of [TileMapLayer]s to a mask shader. +## +## Shaders such as world_rewoven.gdshader stretch a mask texture across a rect +## given in world units, so that it spans the affected area exactly once whether +## the material is applied to a [CanvasGroup] or to a single [CanvasItem]. This +## node computes that rect from the tiles that are in use, and writes it into the +## [code]mask_origin[/code] and [code]mask_size[/code] parameters of the +## [ShaderMaterial] of [member BaseCanvasItemBehavior.canvas_item]. +## [br][br] +## Only [TileMapLayer]s are measured: the canvas item itself if it is one, plus +## every [TileMapLayer] among its descendants. A [Sprite2D], or any other kind of +## [CanvasItem], is ignored, because Godot has no general way to ask a canvas +## item for its bounds. So a [CanvasGroup] that mixes tile layers with other +## nodes gets a rect that covers the tile layers only, and one with no tile layer +## at all gets no rect, leaving the shader parameters untouched. +## [br][br] +## Add it as a child of the node holding the material. If [member +## BaseCanvasItemBehavior.canvas_item] is not set, the parent is used. + +const MASK_ORIGIN := &"mask_origin" +const MASK_SIZE := &"mask_size" + +## Recompute the rect. Useful after changing the tiles. +@export_tool_button("Update bounds") var update_button: Callable = update_bounds + + +func _set_canvas_item(new_canvas_item: CanvasItem) -> void: + super(new_canvas_item) + update_bounds() + + +func _ready() -> void: + update_bounds() + + +func _get_configuration_warnings() -> PackedStringArray: + var warnings := super() + if canvas_item: + if canvas_item.material is not ShaderMaterial: + warnings.push_back("Canvas item does not have a ShaderMaterial.") + elif _collect_layers(canvas_item).is_empty(): + warnings.push_back( + "No TileMapLayer found in the canvas item, so bounds cannot be computed." + ) + return warnings + + +## Computes the world-space bounds of the canvas item's tiles and writes them to +## its material. +func update_bounds() -> void: + if not is_inside_tree() or not canvas_item: + return + + var material := canvas_item.material as ShaderMaterial + if not material: + return + + var bounds := get_world_bounds(canvas_item) + if not bounds.has_area(): + return + + material.set_shader_parameter(MASK_ORIGIN, bounds.position) + material.set_shader_parameter(MASK_SIZE, bounds.size) + + +## Returns the bounds, in world units, of every [TileMapLayer] in [param root], +## including itself. Returns an empty [Rect2] when there is none. +static func get_world_bounds(root: CanvasItem) -> Rect2: + var bounds := Rect2() + var first := true + + for layer: TileMapLayer in _collect_layers(root): + if not layer.tile_set: + continue + var used := layer.get_used_rect() + if not used.has_area(): + continue + + # get_used_rect() is in tile coordinates; convert to the layer's local + # pixels, then to world space so the rect is comparable across layers. + var tile_size := Vector2(layer.tile_set.tile_size) + var local := Rect2(Vector2(used.position) * tile_size, Vector2(used.size) * tile_size) + var world := layer.get_global_transform() * local + + if first: + bounds = world + first = false + else: + bounds = bounds.merge(world) + + return bounds + + +static func _collect_layers(node: Node) -> Array[TileMapLayer]: + var layers: Array[TileMapLayer] = [] + if node is TileMapLayer: + layers.append(node as TileMapLayer) + for child: Node in node.get_children(): + layers.append_array(_collect_layers(child)) + return layers diff --git a/scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd.uid b/scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd.uid new file mode 100644 index 000000000..bb6394eab --- /dev/null +++ b/scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd.uid @@ -0,0 +1 @@ +uid://dpw8lcjx68p3o diff --git a/scenes/game_elements/fx/world_rewoven/components/world_rewoven.gdshader b/scenes/game_elements/fx/world_rewoven/components/world_rewoven.gdshader index 6386fc09a..f277016d7 100644 --- a/scenes/game_elements/fx/world_rewoven/components/world_rewoven.gdshader +++ b/scenes/game_elements/fx/world_rewoven/components/world_rewoven.gdshader @@ -4,14 +4,29 @@ * SPDX-License-Identifier: MPL-2.0 */ shader_type canvas_item; -render_mode unshaded; +// Not unshaded: the engine only applies the color of a CanvasModulate, and 2D +// lights, to canvas items that are not unshaded. Without this, a node using this +// shader stays untinted while the rest of the scene is tinted. uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest; /** * Grayscale texture with the pattern of the fade. */ -uniform sampler2D mask_texture : hint_default_white; +uniform sampler2D mask_texture : hint_default_white, repeat_disable; + +/** + * Origin, in world units, of the region the fade mask is stretched across. + */ +uniform vec2 mask_origin = vec2(0.0); + +/** + * Size, in world units, of the region the fade mask is stretched across. Set + * this together with [member mask_origin] to the bounds of the affected area, + * so the mask spans it exactly once whether this material is applied to a + * [CanvasGroup] or to a single [CanvasItem] such as a [TileMapLayer]. + */ +uniform vec2 mask_size = vec2(1920.0, 1080.0); /** * Grayscale texture with a fabric pattern to multiply the fade mask. @@ -30,6 +45,11 @@ uniform float fabric_scale : hint_range(0.01, 30.0) = 1.0; */ uniform float progress : hint_range(0.0, 1.0) = 0.0; +/** + * Wether to target a CanvasGroup node or a single CanvasItem. + */ +uniform bool target_canvas_group = true; + /** * How smooth is the edge of the fade. */ @@ -41,9 +61,16 @@ uniform float smoothness : hint_range(0.0, 1.0) = 0.1; uniform float burn_size : hint_range(0.0, 1.0) = 0.15; /** - * The burn color. + * The burn color. Brighter than white, so that it reads as light. + */ +uniform vec4 burn_color : source_color = vec4(1.353, 1.353, 0.777, 1.0); + +/** + * Color of the [CanvasModulate] of the scene, if there is one. The burn is + * divided by it, so that the multiplication the engine does afterwards cancels + * out and the burn keeps its full brightness, as if it was made of light. */ -uniform vec4 burn_color : source_color = vec4(1.0, 1.0, 0.58, 1.0); +uniform vec4 canvas_modulate : source_color = vec4(1.0, 1.0, 1.0, 1.0); /** * How gray is the existing color (not the burn). @@ -62,16 +89,28 @@ void vertex() { void fragment() { // Sample the main texture color of the node - vec4 main_color = textureLod(screen_texture, SCREEN_UV, 0.0); - if (main_color.a > 0.0001) { - main_color.rgb /= main_color.a; + vec4 main_color; + if (target_canvas_group) { + main_color = textureLod(screen_texture, SCREEN_UV, 0.0); + if (main_color.a > 0.0001) { + main_color.rgb /= main_color.a; + } + } else { + // COLOR already holds the texture multiplied by the node's modulate, so + // sampling TEXTURE again here would apply the texture twice and darken + // the result. + main_color = COLOR; } // A gray version of the main color. float gray = dot(main_color.rgb, vec3(0.299, 0.587, 0.114)); - // Sample the mask texture value (taking the red channel) - float mask_value = texture(mask_texture, UV).r; + // Sample the mask texture value (taking the red channel). Using world + // position instead of UV, because on a TileMapLayer UV is the coordinate + // into the tileset atlas of each individual tile, not a coordinate across + // the whole node, which would repeat the mask on every tile. + vec2 mask_uv = (world_position - mask_origin) / mask_size; + float mask_value = texture(mask_texture, mask_uv).r; // Sample the fabric pattern texture (taking the red channel). Sampling by // world position gives the pattern a fixed size in world units, so it grows @@ -81,18 +120,26 @@ void fragment() { vec2 fabric_uv = world_position / (vec2(textureSize(fabric_texture, 0)) * fabric_scale); float fabric_value = 1. - texture(fabric_texture, fabric_uv).r; + // Sweep the threshold slightly past the 0.0 to 1.0 range of the mask, by the + // width of the widest edge, so that progress 0.0 hides every pixel and + // progress 1.0 shows every pixel, whatever the mask texture contains. In + // between, the mask still drives the shape of the transition. + float edge_size = max(smoothness, burn_size); + float threshold = 1.0 - progress * (1.0 + edge_size); + // Calculate a clean alpha cutoff based on progress using smoothness. - float alpha = smoothstep(1.0 - progress, 1.0 - progress + smoothness, mask_value); + float alpha = smoothstep(threshold, threshold + smoothness, mask_value); // Calculate the burn, using burn_size. - float burn = smoothstep(1.0 - progress + burn_size, 1.0 - progress, mask_value); + float burn = smoothstep(threshold + burn_size, threshold, mask_value); vec3 final_color = main_color.rgb; // Apply gray: final_color = mix(final_color, vec3(gray), gray_intensity); - // Apply burn: + // Apply burn, undoing the canvas modulate so that it looks unshaded: if (burn_size != 0.0) { - final_color = mix(final_color, burn_color.rgb, burn * burn_color.a); + vec3 unshaded_burn = burn_color.rgb / max(canvas_modulate.rgb, vec3(0.001)); + final_color = mix(final_color, unshaded_burn, burn * burn_color.a); } // Apply the fabric texture. alpha *= 2.2 * smoothstep(0., fabric_value, alpha); diff --git a/scenes/game_elements/fx/world_rewoven/components/world_rewoven_cutscene_1.tscn b/scenes/game_elements/fx/world_rewoven/components/world_rewoven_cutscene_1.tscn index 702b6ec1c..51a8ef5d3 100644 --- a/scenes/game_elements/fx/world_rewoven/components/world_rewoven_cutscene_1.tscn +++ b/scenes/game_elements/fx/world_rewoven/components/world_rewoven_cutscene_1.tscn @@ -277,12 +277,16 @@ fill_to = Vector2(0, 0) [sub_resource type="ShaderMaterial" id="ShaderMaterial_36ifl"] shader = ExtResource("6_e0bq6") shader_parameter/mask_texture = SubResource("GradientTexture2D_p2pfq") +shader_parameter/mask_origin = Vector2(0, 0) +shader_parameter/mask_size = Vector2(1920, 1080) shader_parameter/fabric_texture = ExtResource("7_d870b") shader_parameter/fabric_scale = 1.0 -shader_parameter/progress = 0.15483856 +shader_parameter/progress = 1.0 +shader_parameter/target_canvas_group = true shader_parameter/smoothness = 0.10000000475 shader_parameter/burn_size = 0.0 -shader_parameter/burn_color = Color(1, 1, 0.58, 1) +shader_parameter/burn_color = Color(1.353, 1.353, 0.777, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) shader_parameter/gray_intensity = 0.6470000307325 [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_nvr1k"] @@ -386,12 +390,16 @@ fill_to = Vector2(1, 0.08974359) [sub_resource type="ShaderMaterial" id="ShaderMaterial_hrqc3"] shader = ExtResource("6_e0bq6") shader_parameter/mask_texture = SubResource("GradientTexture2D_d870b") +shader_parameter/mask_origin = Vector2(0, 0) +shader_parameter/mask_size = Vector2(1920, 1080) shader_parameter/fabric_texture = ExtResource("7_d870b") shader_parameter/fabric_scale = 1.00000004680148 -shader_parameter/progress = 0.96000004 +shader_parameter/progress = 0.08 +shader_parameter/target_canvas_group = true shader_parameter/smoothness = 0.1 shader_parameter/burn_size = 0.15 -shader_parameter/burn_color = Color(1, 1, 0.58, 1) +shader_parameter/burn_color = Color(1.353, 1.353, 0.777, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) shader_parameter/gray_intensity = 0.0 [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_qs15o"] @@ -471,13 +479,13 @@ position = Vector2(0, 112) [node name="Common" type="Node2D" parent="AspectRatioContainer/Wrapper/WorldRewoven" unique_id=288379822] [node name="Water" type="TileMapLayer" parent="AspectRatioContainer/Wrapper/WorldRewoven/Common" unique_id=1829302660] -modulate = Color(0.9481866, 0.90357035, 0.91557986, 1) +modulate = Color(0.6373058, 0.32499206, 0.40905845, 1) tile_map_data = PackedByteArray("AADw//f/AAAAAAAAAADw//j/AAAAAAAAAADw//n/AAAAAAAAAADw//r/AAAAAAAAAADw//v/AAAAAAAAAADw//z/AAAAAAAAAADw//3/AAAAAAAAAADw//7/AAAAAAAAAADw////AAAAAAAAAADw/wAAAAAAAAAAAADw/wEAAAAAAAAAAADw/wIAAAAAAAAAAADw/wMAAAAAAAAAAADw/wQAAAAAAAAAAADw/wUAAAAAAAAAAADw/wYAAAAAAAAAAADw/wcAAAAAA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AAAAD2/wgAAAAAAAAAAAD3/wgAAAAAAAAAAAD4/wgAAAAAAAAAAAD5/wgAAAAAAAAAAAD6/wgAAAAAAAAAAAD7/wgAAAAAAAAAAAD8/wgAAAAAAAAAAAD9/wgAAAAAAAAAAAD+/wgAAAAAAAAAAAD//wgAAAAAAAAAAAAAAAgAAAAAAAAAAAABAAgAAAAAAAAAAAACAAgAAAAAAAAAAAADAAgAAAAAAAAAAAAEAAgAAAAAAAAAAAAFAAgAAAAAAAAAAAAGAAgAAAAAAAAAAAAHAAgAAAAAAAAAAAAIAAgAAAAAAAAAAAAJAAgAAAAAAAAAAAAKAAgAAAAAAAAAAAALAAgAAAAAAAAAAAAMAAgAAAAAAAAAAAANAAgAAAAAAAAAAAAOAAgAAAAAAAAAAAAPAAgAAAAAAAAAAAA=") tile_set = ExtResource("2_yewlk") collision_enabled = false [node name="Clouds" type="Node2D" parent="AspectRatioContainer/Wrapper/WorldRewoven/Common" unique_id=245969548] -modulate = Color(0.9247073, 0.9247073, 0.9247073, 0.9115769) +modulate = Color(0.47295138, 0.47295138, 0.47295138, 0.3810385) y_sort_enabled = true [node name="Clouds01" type="Sprite2D" parent="AspectRatioContainer/Wrapper/WorldRewoven/Common/Clouds" unique_id=1413601900] @@ -746,7 +754,7 @@ metadata/_custom_type_script = "uid://dunsvrhq42214" [node name="ShineParticles" type="GPUParticles2D" parent="AspectRatioContainer/Wrapper/WorldRewoven" unique_id=1370188511] modulate = Color(1, 1, 0, 1) material = SubResource("CanvasItemMaterial_tnibl") -position = Vector2(747.68005, 1.0000038) +position = Vector2(-1129.36, 1.0000038) rotation = 0.16250198 amount = 50 texture = ExtResource("43_ny73w") @@ -770,9 +778,9 @@ joint_mode = 2 curve = SubResource("Curve2D_ck1ya") [node name="PathFollow2D" type="PathFollow2D" parent="AspectRatioContainer/Wrapper/WorldRewoven/LineEffect/Path2D" unique_id=951240730] -position = Vector2(974.0001, -127) +position = Vector2(-515.5467, -334.30157) rotation = -1.4861017 -progress = 3254.922 +progress = 716.94806 rotates = false [node name="CurlyTrail" parent="AspectRatioContainer/Wrapper/WorldRewoven/LineEffect/Path2D/PathFollow2D" unique_id=760772735 node_paths=PackedStringArray("line") instance=ExtResource("47_k6wni")] diff --git a/scenes/game_elements/fx/world_rewoven/components/world_rewoven_cutscene_2.tscn b/scenes/game_elements/fx/world_rewoven/components/world_rewoven_cutscene_2.tscn index c317b6c41..d8dbbe581 100644 --- a/scenes/game_elements/fx/world_rewoven/components/world_rewoven_cutscene_2.tscn +++ b/scenes/game_elements/fx/world_rewoven/components/world_rewoven_cutscene_2.tscn @@ -316,23 +316,27 @@ _data = { &"cutscene": SubResource("Animation_e0bq6") } -[sub_resource type="Gradient" id="Gradient_6muf5"] +[sub_resource type="Gradient" id="Gradient_nmkn7"] -[sub_resource type="GradientTexture2D" id="GradientTexture2D_1ydj4"] -gradient = SubResource("Gradient_6muf5") +[sub_resource type="GradientTexture2D" id="GradientTexture2D_7d4yl"] +gradient = SubResource("Gradient_nmkn7") fill = 1 -fill_from = Vector2(0.41880342, 0.6367521) +fill_from = Vector2(0.2863248, 0.53846157) fill_to = Vector2(0.13247864, 0) [sub_resource type="ShaderMaterial" id="ShaderMaterial_36ifl"] shader = ExtResource("6_y8egr") -shader_parameter/mask_texture = SubResource("GradientTexture2D_1ydj4") +shader_parameter/mask_texture = SubResource("GradientTexture2D_7d4yl") +shader_parameter/mask_origin = Vector2(0, 0) +shader_parameter/mask_size = Vector2(1920, 1080) shader_parameter/fabric_texture = ExtResource("7_cgmo4") shader_parameter/fabric_scale = 1.0 -shader_parameter/progress = 1.0 +shader_parameter/progress = 0.870129868388176 +shader_parameter/target_canvas_group = true shader_parameter/smoothness = 0.0 shader_parameter/burn_size = 0.0 -shader_parameter/burn_color = Color(1, 1, 0.58, 1) +shader_parameter/burn_color = Color(1.353, 1.353, 0.777, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) shader_parameter/gray_intensity = 0.6470000307325 [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_nvr1k"] @@ -435,18 +439,22 @@ colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1) [sub_resource type="GradientTexture2D" id="GradientTexture2D_d870b"] gradient = SubResource("Gradient_lq5qh") fill = 1 -fill_from = Vector2(0.41880342, 0.6367521) +fill_from = Vector2(0.2863248, 0.53846157) fill_to = Vector2(0.13247864, 0) [sub_resource type="ShaderMaterial" id="ShaderMaterial_hrqc3"] shader = ExtResource("6_y8egr") shader_parameter/mask_texture = SubResource("GradientTexture2D_d870b") +shader_parameter/mask_origin = Vector2(0, 0) +shader_parameter/mask_size = Vector2(1920, 1080) shader_parameter/fabric_texture = ExtResource("7_cgmo4") shader_parameter/fabric_scale = 1.0 -shader_parameter/progress = 0.0 +shader_parameter/progress = 0.22 +shader_parameter/target_canvas_group = true shader_parameter/smoothness = 0.1 shader_parameter/burn_size = 0.15 -shader_parameter/burn_color = Color(1, 1, 0.58, 1) +shader_parameter/burn_color = Color(1.353, 1.353, 0.777, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) shader_parameter/gray_intensity = 0.0 [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_qs15o"] @@ -478,7 +486,7 @@ curve = SubResource("Curve_8jhju") [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_nbnht"] lifetime_randomness = 0.5 particle_flag_disable_z = true -emission_shape_scale = Vector3(1, 0.5, 0) +emission_shape_scale = Vector3(3.42, 1.71, 0) emission_shape = 2 emission_sphere_radius = 64.0 direction = Vector3(0, 0, 0) @@ -525,13 +533,13 @@ size_flags_vertical = 4 [node name="Common" type="Node2D" parent="AspectRatioContainer/Wrapper/WorldRewoven" unique_id=288379822] [node name="Water" type="TileMapLayer" parent="AspectRatioContainer/Wrapper/WorldRewoven/Common" unique_id=1829302660] -modulate = Color(0.6325955, 0.3162257, 0.40138388, 1) +modulate = Color(0.6867641, 0.4170386, 0.48964137, 1) tile_map_data = PackedByteArray("AADw//f/AAAAAAAAAADw//j/AAAAAAAAAADw//n/AAAAAAAAAADw//r/AAAAAAAAAADw//v/AAAAAAAAAADw//z/AAAAAAAAAADw//3/AAAAAAAAAADw//7/AAAAAAAAAADw////AAAAAAAAAADw/wAAAAAAAAAAAADw/wEAAAAAAAAAAADw/wIAAAAAAAAAAADw/wMAAAAAAAAAAADw/wQAAAAAAAAAAADw/wUAAAAAAAAAAADw/wYAAAAAAAAAAADw/wcAAAAAAAAAAADx//f/AAAAAAAAAADx//j/AAAAAAAAAADx//n/AAAAAAAAAADx//r/AAAAAAAAAADx//v/AAAAAAAAAADx//z/AAAAAAAAAADx//3/AAAAAAAAAADx//7/AAAAAAAAAADx////AAAAAAAAAADx/wAAAAAAAAAAAADx/wEAAAAAAAAAAADx/wIAAAAAAAAAAADx/wMAAAAAAAAAAADx/wQAAAAAAAAAAADx/wUAAAAAAAAAAADx/wYAAAAAAAAAAADx/wcAAAAAAAAAAADy//f/AAAAAAAAAADy//j/AAAAAAAAAADy//n/AAAAAAAAAADy//r/AAAAAAAAAADy//v/AAAAAAAAAADy//z/AAAAAAAAAADy//3/AAAAAAAAAADy//7/AAAAAAAAAADy////AAAAAAAAAADy/wAAAAAAAAAAAADy/wEAAAAAAAAAAADy/wIAAAAAAAAAAADy/wMAAAAAAAAAAADy/wQAAAAAAAAAAADy/wUAAAAAAAAAAADy/wYAAAAAAAAAAADy/wcAAAAAAAAAAADz//f/AAAAAAAAAADz//j/AAAAAAAAAADz//n/AAAAAAAAAADz//r/AAAAAAAAAADz//v/AAAAAAAAAADz//z/AAAAAAAAAADz//3/AAAAAAAAAADz//7/AAAAAAAAAADz////AAAAAAAAAADz/wAAAAAAAAAAAADz/wEAAAAAAAAAAADz/wIAAAAAAAAAAADz/wMAAAAAAAAAAADz/wQAAAAAAAAAAADz/wUAAAAAAAAAAADz/wYAAAAAAAAAAADz/wcAAAAAAAAAAAD0//f/AAAAAAAAAAD0//j/AAAAAAAAAAD0//n/AAAAAAAAAAD0//r/AAAAAAAAAAD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AAAAAAAAAAAPAAAAAAAAAAAAAAAPAAEAAAAAAAAAAAAPAAIAAAAAAAAAAAAPAAMAAAAAAAAAAAAPAAQAAAAAAAAAAAAPAAUAAAAAAAAAAAAPAAYAAAAAAAAAAAAPAAcAAAAAAAAAAADw/wgAAAAAAAAAAADx/wgAAAAAAAAAAADy/wgAAAAAAAAAAADz/wgAAAAAAAAAAAD0/wgAAAAAAAAAAAD1/wgAAAAAAAAAAAD2/wgAAAAAAAAAAAD3/wgAAAAAAAAAAAD4/wgAAAAAAAAAAAD5/wgAAAAAAAAAAAD6/wgAAAAAAAAAAAD7/wgAAAAAAAAAAAD8/wgAAAAAAAAAAAD9/wgAAAAAAAAAAAD+/wgAAAAAAAAAAAD//wgAAAAAAAAAAAAAAAgAAAAAAAAAAAABAAgAAAAAAAAAAAACAAgAAAAAAAAAAAADAAgAAAAAAAAAAAAEAAgAAAAAAAAAAAAFAAgAAAAAAAAAAAAGAAgAAAAAAAAAAAAHAAgAAAAAAAAAAAAIAAgAAAAAAAAAAAAJAAgAAAAAAAAAAAAKAAgAAAAAAAAAAAALAAgAAAAAAAAAAAAMAAgAAAAAAAAAAAANAAgAAAAAAAAAAAAOAAgAAAAAAAAAAAAPAAgAAAAAAAAAAAA=") tile_set = ExtResource("2_dec8y") collision_enabled = false [node name="Clouds" type="Node2D" parent="AspectRatioContainer/Wrapper/WorldRewoven/Common" unique_id=604162110] -modulate = Color(0.4661066, 0.4661066, 0.4661066, 0.37300003) +modulate = Color(0.5448216, 0.5448216, 0.5448216, 0.4654423) y_sort_enabled = true [node name="Clouds03" type="Sprite2D" parent="AspectRatioContainer/Wrapper/WorldRewoven/Common/Clouds" unique_id=229245325] @@ -632,7 +640,6 @@ texture = ExtResource("18_xl184") [node name="WorldNew" type="CanvasGroup" parent="AspectRatioContainer/Wrapper/WorldRewoven" unique_id=1449698380] material = SubResource("ShaderMaterial_hrqc3") -position = Vector2(2, 0) [node name="TileMapLayers" type="Node2D" parent="AspectRatioContainer/Wrapper/WorldRewoven/WorldNew" unique_id=1973521633] @@ -848,8 +855,7 @@ metadata/_custom_type_script = "uid://dunsvrhq42214" [node name="ShineParticles" type="GPUParticles2D" parent="AspectRatioContainer/Wrapper/WorldRewoven" unique_id=1370188511] modulate = Color(1, 1, 0, 1) material = SubResource("CanvasItemMaterial_tnibl") -position = Vector2(-90, 207) -emitting = false +position = Vector2(-90, 181.26) amount = 100 texture = ExtResource("48_qofm8") lifetime = 5.0 @@ -872,16 +878,17 @@ joint_mode = 2 curve = SubResource("Curve2D_ah750") [node name="PathFollow2D" type="PathFollow2D" parent="AspectRatioContainer/Wrapper/WorldRewoven/LineEffect/Path2D" unique_id=2140966178] -position = Vector2(-671, 640) +position = Vector2(-193.65665, -17.500929) rotation = -1.4861017 +progress = 2112.3203 rotates = false [node name="CurlyTrail" parent="AspectRatioContainer/Wrapper/WorldRewoven/LineEffect/Path2D/PathFollow2D" unique_id=760772735 node_paths=PackedStringArray("line") instance=ExtResource("50_2bs3d")] +process_mode = 4 line = NodePath("../../../Line2D") radius = 49.99999739229679 [node name="StitchTrail" type="Node2D" parent="AspectRatioContainer/Wrapper/WorldRewoven/LineEffect/Path2D/PathFollow2D" unique_id=374919940 node_paths=PackedStringArray("line")] -process_mode = 4 script = ExtResource("50_wh1pc") line = NodePath("../../../Line2D") width = 30.0 diff --git a/scenes/game_elements/props/lever/components/toggleable.gd b/scenes/game_elements/props/lever/components/toggleable.gd index cbe211d0a..d59bd8d2d 100644 --- a/scenes/game_elements/props/lever/components/toggleable.gd +++ b/scenes/game_elements/props/lever/components/toggleable.gd @@ -15,7 +15,7 @@ extends Node2D ## ## Subclasses can override for other behaviours. func initialize_with_value(value: bool) -> void: - set_toggled(value) + set_toggled(value, true) -@abstract func set_toggled(value: bool) -> void +@abstract func set_toggled(value: bool, immediate: bool = false) -> void diff --git a/scenes/game_elements/props/toggleable_tile_map_layer/toggleable_tile_map_layer.gd b/scenes/game_elements/props/toggleable_tile_map_layer/toggleable_tile_map_layer.gd index d7b7af005..f1787b604 100644 --- a/scenes/game_elements/props/toggleable_tile_map_layer/toggleable_tile_map_layer.gd +++ b/scenes/game_elements/props/toggleable_tile_map_layer/toggleable_tile_map_layer.gd @@ -16,6 +16,12 @@ extends Toggleable ## child of a [TileMapLayer]; or instantiated elsewhere in the tree, in which ## case [member target] must be set. +## Name of the shader parameter that drives the transition. +const PROGRESS_PARAMETER := &"progress" + +## Property path of [constant PROGRESS_PARAMETER], to animate it with a [Tween]. +const PROGRESS_PROPERTY := ^"shader_parameter/progress" + ## The [TileMapLayer] to be toggled. If this script is attached directly to a ## [TileMapLayer], this property cannot be changed. @export var target: TileMapLayer: @@ -26,6 +32,18 @@ extends Toggleable ## than enabled. @export var invert: bool = false +## Duration of a full fade transition. The state is committed halfway through it. +## A transition that interrupts another one is shorter, in proportion to the +## distance left to cover. Set to 0 for no animation, so that the state changes +## immediately. +@export_range(0.0, 10.0, 0.1, "suffix:s") var transition_duration: float = 3.0 + +var _transition_tween: Tween + +## The material that drives the transition, or null when [member target] cannot +## be animated. Resolved once, when [member target] is set. +var _transition_material: ShaderMaterial + func _enter_tree() -> void: if not target: @@ -45,10 +63,47 @@ func _validate_property(property: Dictionary) -> void: func _set_target(value: TileMapLayer) -> void: target = value + _transition_material = _find_transition_material() notify_property_list_changed() update_configuration_warnings() +## Returns the [ShaderMaterial] that drives the transition, looked up in [member +## target] first and then in its first ancestor [CanvasGroup], because the +## material may be applied to a group that composites this layer together with +## others instead of to the layer itself. +## [br][br] +## Returns null when neither has a usable material, in which case the state +## changes with no animation. +func _find_transition_material() -> ShaderMaterial: + if not target: + return null + + var own_material := _as_transition_material(target.material) + if own_material: + return own_material + + var ancestor := target.get_parent() + while ancestor: + if ancestor is CanvasGroup: + return _as_transition_material((ancestor as CanvasGroup).material) + ancestor = ancestor.get_parent() + + return null + + +## Returns [param material] if it can drive the transition, which means being a +## [ShaderMaterial] with a [constant PROGRESS_PARAMETER] parameter. Returns null +## otherwise. +static func _as_transition_material(target_material: Material) -> ShaderMaterial: + var shader_material := target_material as ShaderMaterial + if not shader_material: + return null + if shader_material.get_shader_parameter(PROGRESS_PARAMETER) == null: + return null + return shader_material + + func _get_configuration_warnings() -> PackedStringArray: var warnings := PackedStringArray() if not target and (self as Node2D) is not TileMapLayer: @@ -56,5 +111,48 @@ func _get_configuration_warnings() -> PackedStringArray: return warnings -func set_toggled(value: bool) -> void: - target.enabled = value if invert else not value +func set_toggled(value: bool, immediate: bool = false) -> void: + if _transition_tween: + _transition_tween.kill() + var enabled := value if invert else not value + + var can_animate := not immediate and transition_duration > 0.0 and _transition_material != null + if not can_animate: + # Settle the effect on the value it would have at the end of a + # transition, so that the node is correctly initialized and a later + # transition starts from a known state. + if _transition_material: + _transition_material.set_shader_parameter(PROGRESS_PARAMETER, 1.0 if enabled else 0.0) + _set_interactions_enabled(enabled) + target.enabled = enabled + return + + # Keep the layer rendered and visible for the whole transition, so that the + # shader has something to fade in or out. + target.enabled = true + + # Split the tween in two halves. Halfway through, commit everything except + # rendering, so that the change is felt in the middle of the transition. + # Rendering is only disabled at the very end, because turning it off earlier + # would hide the second half of the transition. + # Each half lasts in proportion to the distance it covers, so that the effect + # moves at a constant speed and interrupting a transition does not restart + # the full duration. + var current_progress: float = _transition_material.get_shader_parameter(PROGRESS_PARAMETER) + var progress: float = 1.0 if enabled else 0.0 + var first_half := transition_duration * absf(0.5 - current_progress) + var second_half := transition_duration * 0.5 + + _transition_tween = create_tween() + _transition_tween.tween_property(_transition_material, PROGRESS_PROPERTY, 0.5, first_half) + _transition_tween.tween_callback(_set_interactions_enabled.bind(enabled)) + _transition_tween.tween_property(_transition_material, PROGRESS_PROPERTY, progress, second_half) + _transition_tween.tween_callback(func() -> void: target.enabled = enabled) + + +## Enables or disables everything in [member target] that is not about rendering, +## so that the layer keeps being drawn while the transition finishes. +func _set_interactions_enabled(enabled: bool) -> void: + target.collision_enabled = enabled + target.navigation_enabled = enabled + target.occlusion_enabled = enabled diff --git a/scenes/game_logic/base_canvas_item_behavior.gd b/scenes/game_logic/base_canvas_item_behavior.gd new file mode 100644 index 000000000..562b08a86 --- /dev/null +++ b/scenes/game_logic/base_canvas_item_behavior.gd @@ -0,0 +1,32 @@ +# SPDX-FileCopyrightText: The Threadbare Authors +# SPDX-License-Identifier: MPL-2.0 +@tool +@abstract class_name BaseCanvasItemBehavior +extends Node +## @experimental +## +## Base class for canvas item behaviors. + +## The controlled canvas item.[br][br] +## +## [b]Note:[/b] If the parent node is a CanvasItem and canvas_item isn't set, +## the parent node will be automatically assigned to this variable. +@export var canvas_item: CanvasItem: + set = _set_canvas_item + + +func _enter_tree() -> void: + if not canvas_item and get_parent() is CanvasItem: + canvas_item = get_parent() + + +func _set_canvas_item(new_canvas_item: CanvasItem) -> void: + canvas_item = new_canvas_item + update_configuration_warnings() + + +func _get_configuration_warnings() -> PackedStringArray: + var warnings: PackedStringArray + if not canvas_item: + warnings.append("Canvas item must be set.") + return warnings diff --git a/scenes/game_logic/base_canvas_item_behavior.gd.uid b/scenes/game_logic/base_canvas_item_behavior.gd.uid new file mode 100644 index 000000000..848a952c3 --- /dev/null +++ b/scenes/game_logic/base_canvas_item_behavior.gd.uid @@ -0,0 +1 @@ +uid://by83qit2lrb3a diff --git a/scenes/game_logic/canvasitem_behaviors/modulate_as_sky_behavior.gd b/scenes/game_logic/canvasitem_behaviors/modulate_as_sky_behavior.gd index f077c70c1..eeee88337 100644 --- a/scenes/game_logic/canvasitem_behaviors/modulate_as_sky_behavior.gd +++ b/scenes/game_logic/canvasitem_behaviors/modulate_as_sky_behavior.gd @@ -2,35 +2,14 @@ # SPDX-License-Identifier: MPL-2.0 @tool class_name ModulateAsSkyBehavior -extends Node +extends BaseCanvasItemBehavior ## @experimental ## ## Tint the canvas item according to the sky color. -## The controlled canvas item. -@export var canvas_item: CanvasItem: - set = _set_canvas_item - var time_and_weather: TimeAndWeather -func _enter_tree() -> void: - if not canvas_item and get_parent() is CanvasItem: - canvas_item = get_parent() - - -func _set_canvas_item(new_canvas_item: CanvasItem) -> void: - canvas_item = new_canvas_item - update_configuration_warnings() - - -func _get_configuration_warnings() -> PackedStringArray: - var warnings: PackedStringArray - if not canvas_item: - warnings.append("Canvas item must be set.") - return warnings - - func _ready() -> void: if Engine.is_editor_hint(): set_process(false) diff --git a/scenes/world_map/components/frays_end.dialogue b/scenes/world_map/components/frays_end.dialogue index 5859a5576..90b8f07ab 100644 --- a/scenes/world_map/components/frays_end.dialogue +++ b/scenes/world_map/components/frays_end.dialogue @@ -57,7 +57,7 @@ Dolores: Tell me about Dev Archipelago! set GameState.global.facts.dev_island_unlocked = false # TODO: no change notification for facts :( do dev_island_unlocker.refresh() - do wait(0.5) + do wait(3.5) Dolores: Talk to me again if you change your mind. => END @@ -78,7 +78,7 @@ Dolores: Do you want to see it for yourself? set GameState.global.facts.dev_island_unlocked = true # TODO: no change notification for facts :( do dev_island_unlocker.refresh() - do wait(0.5) + do wait(3.5) Dolores: Wow, how did that bridge fix itself? => beach_go_to_dev_island diff --git a/scenes/world_map/frays_end.tscn b/scenes/world_map/frays_end.tscn index 95b47b0c9..f4acdd73c 100644 --- a/scenes/world_map/frays_end.tscn +++ b/scenes/world_map/frays_end.tscn @@ -25,9 +25,12 @@ [ext_resource type="TileSet" uid="uid://ciq5guijvlyb0" path="res://tiles/void_chromakey.tres" id="12_f3823"] [ext_resource type="Texture2D" uid="uid://cyvi71ryavsld" path="res://scenes/game_elements/props/decoration/books/components/Books_2.png" id="13_xt3dw"] [ext_resource type="Script" uid="uid://c5jp8y8mpge4w" path="res://scenes/game_elements/props/toggleable_tile_map_layer/toggleable_tile_map_layer.gd" id="14_f3823"] +[ext_resource type="Shader" uid="uid://dui35fhf12sp5" path="res://scenes/game_elements/fx/world_rewoven/components/world_rewoven.gdshader" id="15_t7c6s"] [ext_resource type="PackedScene" uid="uid://bp20cjimwi8l0" path="res://scenes/game_elements/props/buildings/house/house_2.tscn" id="15_uhynt"] [ext_resource type="PackedScene" uid="uid://712saqgof3kf" path="res://scenes/game_elements/props/eternal_loom/eternal_loom.tscn" id="16_ojp30"] +[ext_resource type="Texture2D" uid="uid://drlsbgxh5e6vv" path="res://scenes/game_elements/fx/world_rewoven/components/fabric_texture.png" id="16_ulm71"] [ext_resource type="PackedScene" uid="uid://cpaplgh708bc3" path="res://scenes/game_elements/characters/npcs/npc_prop/fray_axeman.tscn" id="17_0a1i7"] +[ext_resource type="Script" uid="uid://dpw8lcjx68p3o" path="res://scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd" id="17_uxfrp"] [ext_resource type="PackedScene" uid="uid://v3usqiwy5wpr" path="res://scenes/game_elements/props/decoration/rock/rock.tscn" id="18_jbsab"] [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="18_yntpr"] [ext_resource type="PackedScene" uid="uid://n8dhed3nvf50" path="res://scenes/game_elements/characters/npcs/npc_prop/fray_hammerman.tscn" id="19_yntpr"] @@ -60,6 +63,228 @@ [ext_resource type="Script" uid="uid://cmika1t1573xe" path="res://scenes/world_map/components/frays_end_exit_blocker.gd" id="62_t7c6s"] [ext_resource type="PackedScene" uid="uid://covsdqqsd6rsy" path="res://scenes/game_elements/props/sign/sign.tscn" id="64_uxfrp"] +[sub_resource type="FastNoiseLite" id="FastNoiseLite_t7c6s"] +seed = 5566801 +frequency = 0.0148 + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_ulm71"] +width = 32 +height = 64 +noise = SubResource("FastNoiseLite_t7c6s") + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_uxfrp"] +shader = ExtResource("15_t7c6s") +shader_parameter/mask_texture = SubResource("NoiseTexture2D_ulm71") +shader_parameter/mask_origin = Vector2(-64, 320) +shader_parameter/mask_size = Vector2(192, 640) +shader_parameter/fabric_texture = ExtResource("16_ulm71") +shader_parameter/fabric_scale = 1.0 +shader_parameter/progress = 1.0 +shader_parameter/target_canvas_group = true +shader_parameter/smoothness = 0.4910000233225 +shader_parameter/burn_size = 0.4470000212325 +shader_parameter/burn_color = Color(1.1281133, 0.7659265, 1.353256, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) +shader_parameter/gray_intensity = 0.0 + +[sub_resource type="Gradient" id="Gradient_wymun"] +colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_f3823"] +gradient = SubResource("Gradient_wymun") +fill_from = Vector2(0, 1) +fill_to = Vector2(0, 0) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_7kfal"] +shader = ExtResource("15_t7c6s") +shader_parameter/mask_texture = SubResource("GradientTexture2D_f3823") +shader_parameter/mask_origin = Vector2(2624, 1728) +shader_parameter/mask_size = Vector2(64, 384) +shader_parameter/fabric_texture = ExtResource("16_ulm71") +shader_parameter/fabric_scale = 1.0 +shader_parameter/progress = 1.0 +shader_parameter/target_canvas_group = false +shader_parameter/smoothness = 0.3230000153425 +shader_parameter/burn_size = 0.3430000162925 +shader_parameter/burn_color = Color(1.353, 1.353, 0.777, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) +shader_parameter/gray_intensity = 0.0 + +[sub_resource type="Shader" id="Shader_t7c6s"] +code = "/** + * This is intended to be applied to a CanvasGroup material. + * SPDX-FileCopyrightText: The Threadbare Authors + * SPDX-License-Identifier: MPL-2.0 + */ +shader_type canvas_item; +// Not unshaded: the engine only applies the color of a CanvasModulate, and 2D +// lights, to canvas items that are not unshaded. Without this, a node using this +// shader stays untinted while the rest of the scene is tinted. + +uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest; + +/** + * Grayscale texture with the pattern of the fade. + */ +uniform sampler2D mask_texture : hint_default_white, repeat_disable; + +/** + * Origin, in world units, of the region the fade mask is stretched across. + */ +uniform vec2 mask_origin = vec2(0.0); + +/** + * Size, in world units, of the region the fade mask is stretched across. Set + * this together with [member mask_origin] to the bounds of the affected area, + * so the mask spans it exactly once whether this material is applied to a + * [CanvasGroup] or to a single [CanvasItem] such as a [TileMapLayer]. + */ +uniform vec2 mask_size = vec2(1920.0, 1080.0); + +/** + * Grayscale texture with a fabric pattern to multiply the fade mask. + */ +uniform sampler2D fabric_texture : repeat_enable; + +/** + * Scale of the fabric pattern texture, in world units per texel. At 1.0 the + * fabric is sampled at the same resolution as the world, so one texel of the + * texture covers exactly one world pixel. + */ +uniform float fabric_scale : hint_range(0.01, 30.0) = 1.0; + +/** + * Fade progress: 0.0 is fully hidden, 1.0 is fully visible + */ +uniform float progress : hint_range(0.0, 1.0) = 0.0; + +/** + * Wether to target a CanvasGroup node or a single CanvasItem. + */ +uniform bool target_canvas_group = true; + +/** + * How smooth is the edge of the fade. + */ +uniform float smoothness : hint_range(0.0, 1.0) = 0.1; + +/** + * How long is the edge of the fade. + */ +uniform float burn_size : hint_range(0.0, 1.0) = 0.15; + +/** + * The burn color. Brighter than white, so that it reads as light. + */ +uniform vec4 burn_color : source_color = vec4(1.353, 1.353, 0.777, 1.0); + +/** + * Color of the [CanvasModulate] of the scene, if there is one. The burn is + * divided by it, so that the multiplication the engine does afterwards cancels + * out and the burn keeps its full brightness, as if it was made of light. + */ +uniform vec4 canvas_modulate : source_color = vec4(1.0, 1.0, 1.0, 1.0); + +/** + * How gray is the existing color (not the burn). + */ +uniform float gray_intensity : hint_range(0.0, 1.0) = 0.0; + +/** + * Position of the fragment in world space, so the fabric pattern is anchored to + * the world instead of to the screen. + */ +varying vec2 world_position; + +void vertex() { + world_position = (MODEL_MATRIX * vec4(VERTEX, 0.0, 1.0)).xy; +} + +void fragment() { + // Sample the main texture color of the node + vec4 main_color; + if (target_canvas_group) { + main_color = textureLod(screen_texture, SCREEN_UV, 0.0); + if (main_color.a > 0.0001) { + main_color.rgb /= main_color.a; + } + } else { + // COLOR already holds the texture multiplied by the node's modulate, so + // sampling TEXTURE again here would apply the texture twice and darken + // the result. + main_color = COLOR; + } + + // A gray version of the main color. + float gray = dot(main_color.rgb, vec3(0.299, 0.587, 0.114)); + + // Sample the mask texture value (taking the red channel). Using world + // position instead of UV, because on a TileMapLayer UV is the coordinate + // into the tileset atlas of each individual tile, not a coordinate across + // the whole node, which would repeat the mask on every tile. + vec2 mask_uv = (world_position - mask_origin) / mask_size; + float mask_value = texture(mask_texture, mask_uv).r; + + // Sample the fabric pattern texture (taking the red channel). Sampling by + // world position gives the pattern a fixed size in world units, so it grows + // when zooming in and scrolls along with the camera. Dividing by the texture + // size turns world units into UVs, so at fabric_scale 1.0 one texel covers + // one world pixel. + vec2 fabric_uv = world_position / (vec2(textureSize(fabric_texture, 0)) * fabric_scale); + float fabric_value = 1. - texture(fabric_texture, fabric_uv).r; + + // Sweep the threshold slightly past the 0.0 to 1.0 range of the mask, by the + // width of the widest edge, so that progress 0.0 hides every pixel and + // progress 1.0 shows every pixel, whatever the mask texture contains. In + // between, the mask still drives the shape of the transition. + float edge_size = max(smoothness, burn_size); + float threshold = 1.0 - progress * (1.0 + edge_size); + + // Calculate a clean alpha cutoff based on progress using smoothness. + float alpha = smoothstep(threshold, threshold + smoothness, mask_value); + + // Calculate the burn, using burn_size. + float burn = smoothstep(threshold + burn_size, threshold, mask_value); + + vec3 final_color = main_color.rgb; + // Apply gray: + final_color = mix(final_color, vec3(gray), gray_intensity); + // Apply burn, undoing the canvas modulate so that it looks unshaded: + if (burn_size != 0.0) { + vec3 unshaded_burn = burn_color.rgb / max(canvas_modulate.rgb, vec3(0.001)); + final_color = mix(final_color, unshaded_burn, burn * burn_color.a); + } + // Apply the fabric texture. + alpha *= 2.2 * smoothstep(0., fabric_value, alpha); + + COLOR = vec4(final_color, main_color.a * alpha); +} +" + +[sub_resource type="Gradient" id="Gradient_lq5qh"] +offsets = PackedFloat32Array(0, 0.8095238, 1) +colors = PackedColorArray(0.37413925, 0.37413928, 0.37413922, 1, 0, 0, 0, 1, 0.37254903, 0.37254903, 0.37254903, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_jm52i"] +gradient = SubResource("Gradient_lq5qh") +fill_from = Vector2(0.5, 1) +fill_to = Vector2(0.5, 0) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_7n6eg"] +shader = SubResource("Shader_t7c6s") +shader_parameter/mask_texture = SubResource("GradientTexture2D_jm52i") +shader_parameter/mask_origin = Vector2(2624, 1728) +shader_parameter/mask_size = Vector2(64, 384) +shader_parameter/fabric_texture = ExtResource("16_ulm71") +shader_parameter/fabric_scale = 1.0 +shader_parameter/progress = 1.0 +shader_parameter/target_canvas_group = false +shader_parameter/smoothness = 0.3230000153425 +shader_parameter/burn_size = 0.3430000162925 +shader_parameter/burn_color = Color(1.353, 1.353, 0.777, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) +shader_parameter/gray_intensity = 0.0 + [sub_resource type="RectangleShape2D" id="RectangleShape2D_duxxr"] size = Vector2(52, 61) @@ -218,24 +443,44 @@ tile_set = ExtResource("6_5j6h7") tile_map_data = PackedByteArray("AAAEAP//AQAAAAMAAAAFAP//AQABAAMAAAAGAP//AQABAAMAAAAHAP//AQACAAMAAAA=") tile_set = ExtResource("7_r1ek1") -[node name="WestPathBarrierVoid" type="TileMapLayer" parent="TileMapLayers" unique_id=1715727017] +[node name="CanvasGroup" type="CanvasGroup" parent="TileMapLayers" unique_id=402749041] +material = SubResource("ShaderMaterial_uxfrp") + +[node name="WestPathBarrierVoid" type="TileMapLayer" parent="TileMapLayers/CanvasGroup" unique_id=1715727017] y_sort_enabled = true material = ExtResource("11_wymun") tile_map_data = PackedByteArray("AAAAAAsADQACAAEAAAD//wsADQAAAAEAAAD//woADQAAAAEAAAAAAAoADQACAAEAAAAAAAkADQACAAEAAAD//wkADQAAAAEAAAD//wgADQAAAAEAAAAAAAgADQACAAEAAAAAAAcADQACAAEAAAD//wcADQAAAAEAAAD//wYADQAAAAEAAAAAAAYADQACAAEAAAAAAAUADQABAAAAAAABAAUADQACAAMAAAD//wUADQAAAAAAAAAAAAwADQACAAEAAAD//wwADQAAAAEAAAAAAA0ADQACAAEAAAAAAA4ADQACAAIAAAD//w4ADQAAAAIAAAD//w0ADQAAAAEAAAA=") tile_set = ExtResource("12_f3823") script = ExtResource("14_f3823") +[node name="TileMapMaskBounds" type="Node" parent="TileMapLayers/CanvasGroup" unique_id=1716818937 node_paths=PackedStringArray("canvas_item")] +script = ExtResource("17_uxfrp") +canvas_item = NodePath("..") +metadata/_custom_type_script = "uid://dpw8lcjx68p3o" + [node name="DevIslandBridgeFixed" type="TileMapLayer" parent="TileMapLayers" unique_id=12215457] +material = SubResource("ShaderMaterial_7kfal") tile_map_data = PackedByteArray("AAApACAAAwAAAAMAAAApAB8AAwAAAAIAAAApAB4AAwAAAAIAAAApAB0AAwAAAAIAAAApABwAAwAAAAIAAAApABsAAwAAAAEAAAA=") tile_set = ExtResource("8_ns5r3") script = ExtResource("14_f3823") invert = true +[node name="TileMapMaskBounds" type="Node" parent="TileMapLayers/DevIslandBridgeFixed" unique_id=2125450515 node_paths=PackedStringArray("canvas_item")] +script = ExtResource("17_uxfrp") +canvas_item = NodePath("..") +metadata/_custom_type_script = "uid://dpw8lcjx68p3o" + [node name="DevIslandBridgeBroken" type="TileMapLayer" parent="TileMapLayers" unique_id=2088215943] +material = SubResource("ShaderMaterial_7n6eg") tile_map_data = PackedByteArray("AAApACAAAwAAAAMAAAApAB8AAwAAAAIAAAApAB4AAwAAAAIAAAApAB0AAwAAAAIAAAApABwAAwABAAMAAAApABsAAwAAAAEAAAA=") tile_set = ExtResource("8_ns5r3") script = ExtResource("14_f3823") +[node name="TileMapMaskBounds" type="Node" parent="TileMapLayers/DevIslandBridgeBroken" unique_id=393070780 node_paths=PackedStringArray("canvas_item")] +script = ExtResource("17_uxfrp") +canvas_item = NodePath("..") +metadata/_custom_type_script = "uid://dpw8lcjx68p3o" + [node name="OnTheGround" type="Node2D" parent="." unique_id=444049774] y_sort_enabled = true @@ -1425,7 +1670,7 @@ y_sort_enabled = true [node name="VoidQuestUnlocker" type="Node" parent="OnTheGround/WestPath" unique_id=1461023268 node_paths=PackedStringArray("targets")] unique_name_in_owner = true script = ExtResource("58_ojao8") -targets = [NodePath("../../../TileMapLayers/WestPathBarrierVoid")] +targets = [NodePath("../../../TileMapLayers/CanvasGroup/WestPathBarrierVoid")] required_quests = Array[ExtResource("59_qgpx3")]([ExtResource("60_6b07c")]) [node name="SpawnPointWestPath" type="Marker2D" parent="OnTheGround/WestPath" unique_id=730185770 groups=["spawn_point"]] diff --git a/scenes/world_map/linenville_path.tscn b/scenes/world_map/linenville_path.tscn index 106b61e4b..da4904bcd 100644 --- a/scenes/world_map/linenville_path.tscn +++ b/scenes/world_map/linenville_path.tscn @@ -7,13 +7,16 @@ [ext_resource type="TileSet" uid="uid://bjx3gvah0ycl1" path="res://tiles/foam_2.tres" id="4_34mct"] [ext_resource type="TileSet" uid="uid://do0ffypatd77h" path="res://tiles/bridges.tres" id="5_lpwsl"] [ext_resource type="Material" uid="uid://64aeyjitacv3" path="res://scenes/game_elements/props/void/void_chromakey_material.tres" id="6_puq78"] +[ext_resource type="Shader" uid="uid://dui35fhf12sp5" path="res://scenes/game_elements/fx/world_rewoven/components/world_rewoven.gdshader" id="7_2w05u"] [ext_resource type="TileSet" uid="uid://ciq5guijvlyb0" path="res://tiles/void_chromakey.tres" id="7_a75xw"] [ext_resource type="Script" uid="uid://c5jp8y8mpge4w" path="res://scenes/game_elements/props/toggleable_tile_map_layer/toggleable_tile_map_layer.gd" id="8_4hkh2"] +[ext_resource type="Texture2D" uid="uid://drlsbgxh5e6vv" path="res://scenes/game_elements/fx/world_rewoven/components/fabric_texture.png" id="8_lpwsl"] [ext_resource type="TileSet" uid="uid://b778cuoftt88r" path="res://tiles/elevation_2.tres" id="9_ddlt2"] [ext_resource type="TileSet" uid="uid://bdc7ucso7bx0s" path="res://tiles/shadows.tres" id="10_34mct"] [ext_resource type="PackedScene" uid="uid://iu2q66clupc6" path="res://scenes/game_elements/characters/player/player.tscn" id="10_b2puy"] [ext_resource type="SpriteFrames" uid="uid://dtoylirwywk0j" path="res://scenes/game_elements/characters/components/sprite_frames/storyweaver_blue.tres" id="11_a8wu3"] [ext_resource type="Script" uid="uid://bhexx6mj1xv3q" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="12_dssa7"] +[ext_resource type="Script" uid="uid://dpw8lcjx68p3o" path="res://scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd" id="12_lpwsl"] [ext_resource type="Script" uid="uid://8umksf8e80fw" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="13_o6gg0"] [ext_resource type="Script" uid="uid://bdhjixygupit1" path="res://scenes/game_elements/props/area_filler/area_filler.gd" id="14_lown6"] [ext_resource type="PackedScene" uid="uid://7873qa54birk" path="res://scenes/game_elements/props/tree/tree.tscn" id="15_8k5o1"] @@ -40,6 +43,31 @@ [ext_resource type="Script" uid="uid://uaaaiviytliw" path="res://scenes/world_map/components/quest_progress_unlocker.gd" id="37_6k2xc"] [ext_resource type="Script" uid="uid://dts1hwdy3phin" path="res://scenes/menus/storybook/components/quest.gd" id="38_2vyp4"] +[sub_resource type="FastNoiseLite" id="FastNoiseLite_puq78"] +seed = 5566423 +frequency = 0.0117 +offset = Vector3(1.5, -7, 0) + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_lpwsl"] +width = 64 +height = 64 +noise = SubResource("FastNoiseLite_puq78") + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_puq78"] +shader = ExtResource("7_2w05u") +shader_parameter/mask_texture = SubResource("NoiseTexture2D_lpwsl") +shader_parameter/mask_origin = Vector2(320, 640) +shader_parameter/mask_size = Vector2(640, 384) +shader_parameter/fabric_texture = ExtResource("8_lpwsl") +shader_parameter/fabric_scale = 1.0 +shader_parameter/progress = 1.0 +shader_parameter/target_canvas_group = true +shader_parameter/smoothness = 0.4910000233225 +shader_parameter/burn_size = 0.4470000212325 +shader_parameter/burn_color = Color(1.1281133, 0.7659265, 1.353256, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) +shader_parameter/gray_intensity = 0.0 + [sub_resource type="Resource" id="Resource_64vrm"] script = ExtResource("13_o6gg0") @@ -91,13 +119,21 @@ tile_set = ExtResource("4_2w05u") tile_map_data = PackedByteArray("AAAxABQAAwACAAAAAAAwABQAAwABAAAAAAAvABQAAwABAAAAAAAuABQAAwABAAAAAAAtABQAAwAAAAAAAAATABQAAwACAAEAAAAaABQAAwABAAIAAAAKAAwAAwAAAAIAAAAKAA0AAwABAAMAAAAKAA4AAwAAAAIAAAAKABAAAwAAAAMAAAAKAA8AAwAAAAIAAAAKAAsAAwAAAAEAAAA=") tile_set = ExtResource("5_lpwsl") -[node name="LinenVilleBarrierVoid" type="TileMapLayer" parent="TileMapLayers" unique_id=1599072802] +[node name="CanvasGroup" type="CanvasGroup" parent="TileMapLayers" unique_id=1934188017] +material = SubResource("ShaderMaterial_puq78") + +[node name="LinenVilleBarrierVoid" type="TileMapLayer" parent="TileMapLayers/CanvasGroup" unique_id=1599072802] y_sort_enabled = true material = ExtResource("6_puq78") tile_map_data = PackedByteArray("AAAIAA0ADQABAAEAAAAJAAwADQABAAEAAAAJAA0ADQABAAEAAAAKAAwADQABAAEAAAAKAA0ADQABAAEAAAAKAA4ADQABAAEAAAALAAwADQABAAEAAAALAA0ADQABAAEAAAALAA4ADQABAAEAAAAMAAsADQABAAEAAAAMAAwADQABAAEAAAAMAA0ADQABAAEAAAAMAA4ADQABAAEAAAANAAsADQABAAEAAAAGAAwAAAAAAAEAAAAHAA0AAAACAAEAAAAIAAwAAAACAAIAAAAJAAsAAAABAAIAAAAKAAsAAAABAAIAAAALAAsAAAACAAIAAAAMAAoAAAABAAIAAAANAAoAAAABAAIAAAAOAAsAAAAAAAEAAAANAAwABQAAAAAAAAANAA0AAAAAAAEAAAANAA4ABAAAAAAAAAAMAA8AAAABAAAAAAALAA8ABgAAAAAAAAAJAA4AAAACAAAAAAAKAA8AAAABAAAAAAAIAA4ABgAAAAAAAAAFAAwAAAACAAEAAAA=") tile_set = ExtResource("7_a75xw") script = ExtResource("8_4hkh2") +[node name="TileMapMaskBounds" type="Node" parent="TileMapLayers/CanvasGroup" unique_id=1376873320 node_paths=PackedStringArray("canvas_item")] +script = ExtResource("12_lpwsl") +canvas_item = NodePath("..") +metadata/_custom_type_script = "uid://dpw8lcjx68p3o" + [node name="Void" type="TileMapLayer" parent="TileMapLayers" unique_id=1337861538] y_sort_enabled = true material = ExtResource("6_puq78") @@ -781,6 +817,6 @@ stream = ExtResource("36_7iwyg") [node name="LinenVilleUnlocker" type="Node" parent="." unique_id=1744151706 node_paths=PackedStringArray("targets")] unique_name_in_owner = true script = ExtResource("37_6k2xc") -targets = [NodePath("../TileMapLayers/LinenVilleBarrierVoid")] +targets = [NodePath("../TileMapLayers/CanvasGroup/LinenVilleBarrierVoid")] required_quests = Array[ExtResource("38_2vyp4")]([ExtResource("30_hq8vv")]) metadata/_custom_type_script = "uid://uaaaiviytliw" diff --git a/scenes/world_map/song_sanctuary_path.tscn b/scenes/world_map/song_sanctuary_path.tscn index 2815c3506..39ce54579 100644 --- a/scenes/world_map/song_sanctuary_path.tscn +++ b/scenes/world_map/song_sanctuary_path.tscn @@ -11,8 +11,11 @@ [ext_resource type="TileSet" uid="uid://b778cuoftt88r" path="res://tiles/elevation_2.tres" id="6_engfb"] [ext_resource type="Texture2D" uid="uid://0xceungm1p8a" path="res://scenes/game_elements/props/buildings/house/components/House_Wool_Red_Stage2.png" id="7_70n28"] [ext_resource type="Script" uid="uid://c5jp8y8mpge4w" path="res://scenes/game_elements/props/toggleable_tile_map_layer/toggleable_tile_map_layer.gd" id="7_bt13d"] +[ext_resource type="Shader" uid="uid://dui35fhf12sp5" path="res://scenes/game_elements/fx/world_rewoven/components/world_rewoven.gdshader" id="7_d6ijo"] +[ext_resource type="Texture2D" uid="uid://drlsbgxh5e6vv" path="res://scenes/game_elements/fx/world_rewoven/components/fabric_texture.png" id="8_jm52i"] [ext_resource type="Texture2D" uid="uid://cfkb8gpxylplg" path="res://scenes/game_elements/props/buildings/house/components/House_Patches_Red_Stage3.png" id="8_m5r1s"] [ext_resource type="Texture2D" uid="uid://d2kjk3oiu5o6o" path="res://scenes/game_elements/props/buildings/house/components/House_Wool_Blue_02.png" id="9_ennvy"] +[ext_resource type="Script" uid="uid://dpw8lcjx68p3o" path="res://scenes/game_elements/fx/world_rewoven/components/tile_map_mask_bounds.gd" id="10_0wbtx"] [ext_resource type="PackedScene" uid="uid://iu2q66clupc6" path="res://scenes/game_elements/characters/player/player.tscn" id="10_8vkdv"] [ext_resource type="PackedScene" uid="uid://b31v66516y4lg" path="res://scenes/game_elements/props/buildings/house/ruined_house.tscn" id="10_70n28"] [ext_resource type="SpriteFrames" uid="uid://dtoylirwywk0j" path="res://scenes/game_elements/characters/components/sprite_frames/storyweaver_blue.tres" id="11_ibyt1"] @@ -43,6 +46,52 @@ [ext_resource type="Script" uid="uid://uaaaiviytliw" path="res://scenes/world_map/components/quest_progress_unlocker.gd" id="40_bt13d"] [ext_resource type="Script" uid="uid://dts1hwdy3phin" path="res://scenes/menus/storybook/components/quest.gd" id="41_nf521"] +[sub_resource type="Gradient" id="Gradient_d6ijo"] + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_au3ml"] +gradient = SubResource("Gradient_d6ijo") +fill_from = Vector2(0, 1) +fill_to = Vector2(0, 0) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_bmevf"] +shader = ExtResource("7_d6ijo") +shader_parameter/mask_texture = SubResource("GradientTexture2D_au3ml") +shader_parameter/mask_origin = Vector2(1280, 640) +shader_parameter/mask_size = Vector2(64, 256) +shader_parameter/fabric_texture = ExtResource("8_jm52i") +shader_parameter/fabric_scale = 1.0 +shader_parameter/progress = 1.0 +shader_parameter/target_canvas_group = false +shader_parameter/smoothness = 0.3230000153425 +shader_parameter/burn_size = 0.3430000162925 +shader_parameter/burn_color = Color(1.353, 1.353, 0.777, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) +shader_parameter/gray_intensity = 0.0 + +[sub_resource type="Gradient" id="Gradient_lq5qh"] +offsets = PackedFloat32Array(0, 0.3697479, 1) +colors = PackedColorArray(0.37413925, 0.37413928, 0.37413922, 1, 0, 0, 0, 1, 0.37254903, 0.37254903, 0.37254903, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_jm52i"] +gradient = SubResource("Gradient_lq5qh") +fill_from = Vector2(0.5, 1) +fill_to = Vector2(0.5, 0) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_d6ijo"] +shader = ExtResource("7_d6ijo") +shader_parameter/mask_texture = SubResource("GradientTexture2D_jm52i") +shader_parameter/mask_origin = Vector2(1280, 640) +shader_parameter/mask_size = Vector2(64, 256) +shader_parameter/fabric_texture = ExtResource("8_jm52i") +shader_parameter/fabric_scale = 1.0 +shader_parameter/progress = 1.0 +shader_parameter/target_canvas_group = false +shader_parameter/smoothness = 0.3230000153425 +shader_parameter/burn_size = 0.3430000162925 +shader_parameter/burn_color = Color(1.353, 1.353, 0.777, 1) +shader_parameter/canvas_modulate = Color(1, 1, 1, 1) +shader_parameter/gray_intensity = 0.0 + [sub_resource type="Resource" id="Resource_ftxxi"] script = ExtResource("17_ubsr8") @@ -123,16 +172,28 @@ tile_map_data = PackedByteArray("AAAJABMAAwAAAAIAAAAJABQAAwAAAAIAAAAJABUAAwAAAAI tile_set = ExtResource("4_engfb") [node name="SideQuestBridgeUnblocked" type="TileMapLayer" parent="TileMapLayers" unique_id=316654240] +material = SubResource("ShaderMaterial_bmevf") tile_map_data = PackedByteArray("AAAUAA0AAwAAAAMAAAAUAAwAAwAAAAIAAAAUAAoAAwAAAAEAAAAUAAsAAwAAAAIAAAA=") tile_set = ExtResource("4_engfb") script = ExtResource("7_bt13d") invert = true +[node name="TileMapMaskBounds" type="Node" parent="TileMapLayers/SideQuestBridgeUnblocked" unique_id=803624483 node_paths=PackedStringArray("canvas_item")] +script = ExtResource("10_0wbtx") +canvas_item = NodePath("..") +metadata/_custom_type_script = "uid://dpw8lcjx68p3o" + [node name="SideQuestBridgeBlocked" type="TileMapLayer" parent="TileMapLayers" unique_id=1335870243] +material = SubResource("ShaderMaterial_d6ijo") tile_map_data = PackedByteArray("AAAUAA0AAwAAAAMAAAAUAAwAAwABAAMAAAAUAAoAAwAAAAEAAAAUAAsAAwAAAAIAAAA=") tile_set = ExtResource("4_engfb") script = ExtResource("7_bt13d") +[node name="TileMapMaskBounds" type="Node" parent="TileMapLayers/SideQuestBridgeBlocked" unique_id=266432187 node_paths=PackedStringArray("canvas_item")] +script = ExtResource("10_0wbtx") +canvas_item = NodePath("..") +metadata/_custom_type_script = "uid://dpw8lcjx68p3o" + [node name="Shadows" type="TileMapLayer" parent="TileMapLayers" unique_id=452826713] tile_map_data = PackedByteArray("AAAWAA4AAAAAAAAAAAAWAA8AAAAAAAAAAAA=") tile_set = ExtResource("5_63tlh")