[gd_scene load_steps=31 format=3 uid="uid://gq33ysuit61b"]

[ext_resource type="Script" uid="uid://o17v5m75ew03" path="res://scenes/custom_render.gd" id="1_gcpng"]
[ext_resource type="PackedScene" uid="uid://c70o7nk6wxcmx" path="res://models/UndertakerBlockout.fbx" id="2_gfayn"]
[ext_resource type="PackedScene" uid="uid://be7u1kn41g2ww" path="res://addons/interaction/interactable.tscn" id="3_u0nvw"]
[ext_resource type="PackedScene" uid="uid://bxuveo0hlwy33" path="res://prefabs/character.tscn" id="4_tedjo"]
[ext_resource type="Script" uid="uid://b1pyctfbd0wvg" path="res://scenes/debug_printer.gd" id="4_ui586"]
[ext_resource type="PackedScene" uid="uid://cv3qpo5lfrchn" path="res://prefabs/lever.tscn" id="5_tedjo"]
[ext_resource type="PackedScene" uid="uid://cx052x8qp7oj2" path="res://prefabs/lid_crane.tscn" id="6_oslft"]
[ext_resource type="Script" uid="uid://bmxu5xdxlq0e6" path="res://scenes/flickering_oven_light.gd" id="7_sve1f"]
[ext_resource type="VoxelGIData" uid="uid://bfwtxdvx4w12w" path="res://scenes/blockout_room.VoxelGI_data.res" id="8_dp7jk"]
[ext_resource type="Shader" uid="uid://bf2nxtrto5u5r" path="res://scenes/main_render.gdshader" id="9_k5i88"]
[ext_resource type="Script" uid="uid://bgrc6ktuxyrm6" path="res://scenes/pickupable.gd" id="10_5747v"]

[sub_resource type="BoxShape3D" id="BoxShape3D_gfayn"]
size = Vector3(12.2438965, 0.48779297, 13.901489)

[sub_resource type="BoxShape3D" id="BoxShape3D_ui586"]
size = Vector3(0.24987793, 1, 1)

[sub_resource type="BoxMesh" id="BoxMesh_oslft"]
size = Vector3(7, 0.1, 10)

[sub_resource type="BoxMesh" id="BoxMesh_gcpng"]
size = Vector3(0.1, 0.02, 2.155)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_oslft"]
emission_enabled = true
emission = Color(1, 1, 1, 1)

[sub_resource type="CylinderMesh" id="CylinderMesh_sve1f"]
material = SubResource("StandardMaterial3D_oslft")
height = 0.001

[sub_resource type="Animation" id="Animation_oslft"]
resource_name = "OvenFlicker"
length = 3.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:light_energy")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.033333335, 0.09333334, 0.16666667, 0.26333332, 0.33333334, 0.43333334, 0.53333336, 0.6066668, 0.7, 0.8, 0.9, 1, 1.1, 1.2333333, 1.3, 1.4, 1.4666667, 1.5702888, 1.6666666, 1.7698421, 1.8333334, 1.9333334, 2, 2.1, 2.1666667, 2.2333333, 2.4666667, 2.5, 2.5666666, 2.6333334, 2.7, 2.8, 2.8666666, 2.9542975),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 0,
"values": [1.0, 1.179, 0.877, 1.31, 1.0, 1.262, 1.0, 0.794, 1.0, 1.0, 1.31, 0.877, 1.0, 1.143, 1.0, 1.179, 1.0, 1.31, 0.961, 1.0, 1.143, 0.961, 1.179, 1.0, 1.096, 1.0, 1.31, 0.794, 1.0, 1.179, 1.0, 1.31, 0.794, 1.0]
}

[sub_resource type="Animation" id="Animation_sve1f"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:light_energy")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [1.0]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_dp7jk"]
_data = {
&"OvenFlicker": SubResource("Animation_oslft"),
&"RESET": SubResource("Animation_sve1f")
}

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_dp7jk"]
albedo_color = Color(0, 0, 0, 1)
emission_enabled = true
emission = Color(1, 1, 1, 1)

[sub_resource type="CylinderMesh" id="CylinderMesh_k5i88"]
material = SubResource("StandardMaterial3D_dp7jk")
top_radius = 0.05
bottom_radius = 0.05
height = 1.0

[sub_resource type="FogMaterial" id="FogMaterial_dp7jk"]
density = 0.1

[sub_resource type="Environment" id="Environment_dp7jk"]
tonemap_mode = 3
ssao_enabled = true
glow_enabled = true
glow_normalized = true
glow_intensity = 1.43
glow_strength = 1.04
glow_bloom = 0.16

[sub_resource type="BoxMesh" id="BoxMesh_5747v"]

[sub_resource type="BoxShape3D" id="BoxShape3D_mu0to"]

[sub_resource type="Curve" id="Curve_gcpng"]
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.26234567, 0.14241672), 0.0, 0.0, 0, 0, Vector2(0.5092592, 0.3427866), 0.0, 0.0, 0, 0, Vector2(0.7561728, 0.6233045), 0.0, 0.0, 0, 0, Vector2(0.8641975, 0.97595555), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.063336894, 0.0, 0, 0]
point_count = 6

[sub_resource type="CurveTexture" id="CurveTexture_5747v"]
curve = SubResource("Curve_gcpng")

[sub_resource type="ShaderMaterial" id="ShaderMaterial_gcpng"]
shader = ExtResource("9_k5i88")
shader_parameter/target_tex_size = Vector2(427, 240)
shader_parameter/sample_count = 1
shader_parameter/color_steps = 16.0
shader_parameter/color_curve = SubResource("CurveTexture_5747v")

[sub_resource type="ViewportTexture" id="ViewportTexture_dp7jk"]
viewport_path = NodePath("SubViewportContainer/SubViewport")

[node name="BlockoutRoom" type="Node3D"]

[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
stretch = true
script = ExtResource("1_gcpng")

[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
handle_input_locally = false
gui_snap_controls_to_pixels = false
size = Vector2i(1152, 648)
render_target_update_mode = 4

[node name="UndertakerBlockout" parent="SubViewportContainer/SubViewport" instance=ExtResource("2_gfayn")]

[node name="OmniLight3D" type="OmniLight3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00014138222, 2.43762, 0.07469213)
light_color = Color(0.9973013, 0.8734352, 0.72215354, 1)
light_energy = 0.0
shadow_enabled = true

[node name="OmniLight3D2" type="OmniLight3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00014138222, 2.43762, 2.7512703)
light_color = Color(0.9973013, 0.8734352, 0.72215354, 1)
light_energy = 0.0
shadow_enabled = true

[node name="OmniLight3D4" type="OmniLight3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.91611, 1.4419059, 2.38809)
light_color = Color(0.99215686, 0.99215686, 0.99215686, 1)
light_energy = 0.086
shadow_enabled = true

[node name="OmniLight3D5" type="OmniLight3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.91611, 1.4419059, 1.3589917)
light_color = Color(0.99215686, 0.99215686, 0.99215686, 1)
light_energy = 0.086
shadow_enabled = true

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(0.72604597, 0.5970169, -0.34121582, 0.6427621, -0.41287613, 0.64528304, 0.24436498, -0.68782574, -0.6835068, 6.874206, 4.957541, 1.7799606)
light_color = Color(0, 0, 0, 1)

[node name="StaticBody3D" type="StaticBody3D" parent="SubViewportContainer/SubViewport"]

[node name="CollisionShape3D" type="CollisionShape3D" parent="SubViewportContainer/SubViewport/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.1646729, -0.25610352, 1.5601196)
shape = SubResource("BoxShape3D_gfayn")

[node name="Interactable" parent="SubViewportContainer/SubViewport" instance=ExtResource("3_u0nvw")]

[node name="CollisionShape3D" type="CollisionShape3D" parent="SubViewportContainer/SubViewport/Interactable"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.1487448, 1.3621653, -0.7917821)
shape = SubResource("BoxShape3D_ui586")

[node name="DebugPrinter" type="Node" parent="SubViewportContainer/SubViewport"]
script = ExtResource("4_ui586")

[node name="Character" parent="SubViewportContainer/SubViewport" instance=ExtResource("4_tedjo")]

[node name="GrabFixPoint" parent="SubViewportContainer/SubViewport/Character/Head" index="4"]
transform = Transform3D(-0.9766723, 0, -0.21473524, 0, 1, 0, 0.21473524, 0, -0.9766723, 0, 0, 0)

[node name="Lever" parent="SubViewportContainer/SubViewport" instance=ExtResource("5_tedjo")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 1.884376, 1.4100053, 4.976951)

[node name="LidCrane" parent="SubViewportContainer/SubViewport" instance=ExtResource("6_oslft")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 5.0008087)

[node name="Cieling" type="Node3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 1.884376, 1.4100053, 4.976951)

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/Cieling"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.8011624, 1.3881333, 4.8832793)
mesh = SubResource("BoxMesh_oslft")

[node name="MeshInstance3D2" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/Cieling"]
transform = Transform3D(-4.371138e-08, -1, -8.742278e-08, 1, -4.371139e-08, 8.742278e-08, -8.742278e-08, -8.742278e-08, 1, -1.085567, 0.19348681, 3.156775)
mesh = SubResource("BoxMesh_gcpng")

[node name="back wall" type="Node3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 1.884376, 1.4100053, 4.976951)

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/back wall"]
transform = Transform3D(1, -8.742278e-08, 8.742278e-08, 8.742278e-08, -4.371139e-08, -1, 8.742278e-08, 1, -4.371138e-08, 1.8011621, -0.67389727, 6.4336667)
mesh = SubResource("BoxMesh_oslft")

[node name="SpotLight3D" type="SpotLight3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(0.44974717, 0.47692466, -0.75516254, 0.36746177, 0.67182255, 0.64313793, 0.81406355, -0.5667428, 0.1268987, -1.7417114, 2.1152334, 4.1011653)
light_color = Color(0.87831414, 0.9912934, 0.9985295, 1)
light_energy = 0.206
light_bake_mode = 1
shadow_enabled = true
spot_range = 16.644
spot_attenuation = 1.44
spot_angle = 80.73
spot_angle_attenuation = 2.828428

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/SpotLight3D"]
transform = Transform3D(0.9999997, 5.9604645e-08, 2.9802322e-08, -2.9802322e-08, -9.685755e-08, -0.9999995, -5.9604645e-08, 0.99999964, 7.450581e-09, -0.01551342, 0.0023140907, 0.006446123)
mesh = SubResource("CylinderMesh_sve1f")
skeleton = NodePath("../../Fake lights")

[node name="Fake lights" type="Node3D" parent="SubViewportContainer/SubViewport"]

[node name="OmniLight3D3" type="OmniLight3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.8505666, 1.2506423, 4.1084437)
light_color = Color(1, 0.6068378, 0.4258487, 1)
light_indirect_energy = 0.0
shadow_enabled = true
omni_range = 2.081
omni_attenuation = 3.068

[node name="AnimationPlayer" type="AnimationPlayer" parent="SubViewportContainer/SubViewport/OmniLight3D3"]
libraries = {
&"": SubResource("AnimationLibrary_dp7jk")
}
script = ExtResource("7_sve1f")

[node name="VoxelGI" type="VoxelGI" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.3855438, 2.5112534, 2.3712463)
size = Vector3(9.520233, 5.2458344, 7.907776)
data = ExtResource("8_dp7jk")

[node name="TubeLight" type="Node3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.0993485, 1.5864359, 1.2863536)

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/TubeLight"]
transform = Transform3D(1, 0, 0, 0, 0, -1.0000001, 0, 1.0000001, 0, 0, 0, 0)
mesh = SubResource("CylinderMesh_k5i88")

[node name="TubeLight2" type="Node3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.0993485, 1.5864359, 2.379497)

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/TubeLight2"]
transform = Transform3D(1, 0, 0, 0, 0, -1.0000001, 0, 1.0000001, 0, 0, 0, 0)
mesh = SubResource("CylinderMesh_k5i88")

[node name="TubeLight3" type="Node3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.881829, 1.3714095, 2.238455)

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/TubeLight3"]
transform = Transform3D(1, 0, 0, 0, 0, -1.0000001, 0, 0.41135335, 0, 0, 0, 0.31269455)
mesh = SubResource("CylinderMesh_k5i88")

[node name="TubeLight4" type="Node3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.881829, 1.3714095, 1.2320452)

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/TubeLight4"]
transform = Transform3D(1, 0, 0, 0, 0, -1.0000001, 0, 0.41135335, 0, 0, 0, 0.31269455)
mesh = SubResource("CylinderMesh_k5i88")

[node name="TubeLight5" type="Node3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.881829, 1.3714095, 0.24469495)

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/TubeLight5"]
transform = Transform3D(1, 0, 0, 0, 0, -1.0000001, 0, 0.41135335, 0, 0, 0, 0.31269455)
mesh = SubResource("CylinderMesh_k5i88")

[node name="TubeLight6" type="Node3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 2.172572, 1.6270136, 4.6471157)

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/TubeLight6"]
transform = Transform3D(1, 0, 0, 0, 0, -1.0000001, 0, 0.41135335, 0, 0, 0, 0.23260427)
mesh = SubResource("CylinderMesh_k5i88")

[node name="FogVolume" type="FogVolume" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.4094696, 1.0683594, 2.2607956)
size = Vector3(9.70578, 4.1367188, 8.059006)
material = SubResource("FogMaterial_dp7jk")

[node name="WorldEnvironment" type="WorldEnvironment" parent="SubViewportContainer/SubViewport"]
environment = SubResource("Environment_dp7jk")

[node name="tmp phone light" type="OmniLight3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(0.5765749, 0.8170443, 0, -0.8170443, 0.5765749, 0, 0, 0, 1, -2.4286354, 2.0967534, -0.82138157)
light_energy = 0.05

[node name="PhysBox" type="RigidBody3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.3421727, 0.88496697, 0)
freeze_mode = 1
script = ExtResource("10_5747v")

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/PhysBox"]
mesh = SubResource("BoxMesh_5747v")

[node name="CollisionShape3D" type="CollisionShape3D" parent="SubViewportContainer/SubViewport/PhysBox"]
shape = SubResource("BoxShape3D_mu0to")

[node name="PhysBox2" type="RigidBody3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.3421727, 1.967477, 0)

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/PhysBox2"]
mesh = SubResource("BoxMesh_5747v")

[node name="CollisionShape3D" type="CollisionShape3D" parent="SubViewportContainer/SubViewport/PhysBox2"]
shape = SubResource("BoxShape3D_mu0to")

[node name="TextureRect" type="TextureRect" parent="."]
material = SubResource("ShaderMaterial_gcpng")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
texture = SubResource("ViewportTexture_dp7jk")

[connection signal="on_hit" from="SubViewportContainer/SubViewport/Interactable" to="SubViewportContainer/SubViewport/DebugPrinter" method="_on_interactable_on_hit"]
[connection signal="changed" from="SubViewportContainer/SubViewport/Lever" to="SubViewportContainer/SubViewport/LidCrane" method="set_grab"]

[editable path="SubViewportContainer/SubViewport/Character"]
