[gd_scene load_steps=28 format=2]

[ext_resource path="res://scripts/scene.gd" type="Script" id=1]
[ext_resource path="res://shaders/Sky.shader" type="Shader" id=2]
[ext_resource path="res://textures/noise.png" type="Texture" id=3]
[ext_resource path="res://scripts/Sky.gd" type="Script" id=4]
[ext_resource path="res://default_env.tres" type="Environment" id=5]
[ext_resource path="res://scripts/scene_cam.gd" type="Script" id=6]
[ext_resource path="res://material/refl.material" type="Material" id=7]
[ext_resource path="res://scripts/set_uniforms.gd" type="Script" id=8]
[ext_resource path="res://shaders/Refl.shader" type="Shader" id=9]
[ext_resource path="res://textures/stormdays_dark.jpg" type="Texture" id=10]
[ext_resource path="res://scripts/cube2rot.gd" type="Script" id=11]
[ext_resource path="res://scripts/full_reflective_body.gd" type="Script" id=12]
[ext_resource path="res://material/full_refl.material" type="Material" id=13]
[ext_resource path="res://scripts/ControUIl.gd" type="Script" id=14]

[sub_resource type="ShaderMaterial" id=1]
shader = ExtResource( 2 )
shader_param/iTime = null
shader_param/iFrame = null
shader_param/COVERAGE = 0.5
shader_param/THICKNESS = 25.0
shader_param/ABSORPTION = 1.031
shader_param/STEPS = 25
shader_param/iChannel0 = ExtResource( 3 )

[sub_resource type="ImageTexture" id=2]
size = Vector2( 1280, 720 )

[sub_resource type="SphereMesh" id=3]

[sub_resource type="SphereMesh" id=4]

[sub_resource type="SpatialMaterial" id=5]
albedo_color = Color( 0.137255, 0.737255, 0.137255, 1 )

[sub_resource type="CubeMesh" id=6]

[sub_resource type="ShaderMaterial" id=7]
shader = ExtResource( 9 )
shader_param/tex_panorama = ExtResource( 10 )

[sub_resource type="PrismMesh" id=8]

[sub_resource type="CubeMesh" id=9]

[sub_resource type="SpatialMaterial" id=10]
albedo_color = Color( 0.847059, 0.203922, 0.203922, 1 )

[sub_resource type="SphereMesh" id=11]

[sub_resource type="CylinderMesh" id=12]

[sub_resource type="CapsuleMesh" id=13]

[node name="scene" type="Spatial"]
script = ExtResource( 1 )

[node name="Sky" type="Viewport" parent="."]
size = Vector2( 1280, 720 )
render_target_update_mode = 3

[node name="Sprite" type="Sprite" parent="Sky"]
material = SubResource( 1 )
texture = SubResource( 2 )
centered = false
script = ExtResource( 4 )

[node name="DirectionalLight" type="DirectionalLight" parent="."]
transform = Transform( 1, 0, 0, 0, -0.900448, 0.434963, 0, -0.434963, -0.900448, 0, 3.84865, -5.0612 )

[node name="scene_cam" type="Camera" parent="."]
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 6.36598, 2.33312, -0.261921 )
environment = ExtResource( 5 )
current = true
script = ExtResource( 6 )
mouse_mode = 0
sensitivity = 0.25
smoothness = 0.7
rotate_privot = true
collisions = false
max_speed = Vector3( 5, 5, 5 )

[node name="cube_refl" type="Spatial" parent="."]

[node name="ball" type="MeshInstance" parent="cube_refl"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3.56692, 0, 0 )
mesh = SubResource( 3 )
material/0 = ExtResource( 7 )
script = ExtResource( 8 )

[node name="ball2" type="MeshInstance" parent="cube_refl"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.95364, 2.38117, 2.79254 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )

[node name="cube" type="MeshInstance" parent="cube_refl"]
transform = Transform( 0, 0, 1, 1, 0, 0, 0, 1, 0, 0.125332, 0, -2.74328 )
mesh = SubResource( 6 )
material/0 = SubResource( 7 )
script = ExtResource( 8 )

[node name="tri" type="MeshInstance" parent="cube_refl"]
mesh = SubResource( 8 )
material/0 = ExtResource( 7 )
script = ExtResource( 8 )

[node name="cube2" type="MeshInstance" parent="cube_refl"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3.98506, 0, -4.16265 )
mesh = SubResource( 9 )
material/0 = SubResource( 10 )
script = ExtResource( 11 )

[node name="viewports" type="Spatial" parent="."]
editor/display_folded = true

[node name="Front" type="Viewport" parent="viewports"]
editor/display_folded = true
size = Vector2( 500, 500 )
render_target_update_mode = 3

[node name="Camera2" type="Camera" parent="viewports/Front"]
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 3, 3, 0 )
current = true
fov = 90.0

[node name="Right" type="Viewport" parent="viewports"]
size = Vector2( 500, 500 )
render_target_update_mode = 3

[node name="Camera3" type="Camera" parent="viewports/Right"]
transform = Transform( -1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 3, 3, 0 )
current = true
fov = 90.0

[node name="Left" type="Viewport" parent="viewports"]
size = Vector2( 500, 500 )
render_target_update_mode = 3

[node name="Camera4" type="Camera" parent="viewports/Left"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 3, 0 )
current = true
fov = 90.0

[node name="Back" type="Viewport" parent="viewports"]
size = Vector2( 500, 500 )
render_target_update_mode = 3

[node name="Camera5" type="Camera" parent="viewports/Back"]
transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 3, 3, 0 )
current = true
fov = 90.0

[node name="Up" type="Viewport" parent="viewports"]
size = Vector2( 500, 500 )
render_target_update_mode = 3

[node name="Camera6" type="Camera" parent="viewports/Up"]
transform = Transform( -1, 8.74228e-08, -3.82137e-15, 0, -4.37114e-08, -1, -8.74228e-08, -1, 4.37114e-08, 3, 3, 0 )
current = true
fov = 90.0

[node name="Down" type="Viewport" parent="viewports"]
size = Vector2( 500, 500 )
render_target_update_mode = 3

[node name="Camera7" type="Camera" parent="viewports/Down"]
transform = Transform( -1, -8.74228e-08, -3.82137e-15, 0, -4.37114e-08, 1, -8.74228e-08, 1, 4.37114e-08, 3, 3, 0 )
current = true
fov = 90.0

[node name="full_refl" type="Spatial" parent="."]
script = ExtResource( 12 )

[node name="refl_body1" type="MeshInstance" parent="full_refl"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 3, 0 )
visible = false
mesh = SubResource( 11 )
material/0 = ExtResource( 13 )

[node name="refl_body2" type="MeshInstance" parent="full_refl"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 3, 0 )
visible = false
mesh = SubResource( 12 )
material/0 = ExtResource( 13 )

[node name="refl_body3" type="MeshInstance" parent="full_refl"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 3, 0 )
mesh = SubResource( 13 )
material/0 = ExtResource( 13 )

[node name="Control" type="Control" parent="."]
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 14 )

[node name="CheckBox" type="CheckBox" parent="Control"]
margin_left = 3.0
margin_top = 115.819
margin_right = 117.0
margin_bottom = 143.819
pressed = true
text = "Rotate obj"

[node name="CheckBox2" type="CheckBox" parent="Control"]
margin_left = 3.0
margin_top = 35.15
margin_right = 75.0
margin_bottom = 59.15
text = "Sphere"

[node name="CheckBox3" type="CheckBox" parent="Control"]
margin_left = 3.0
margin_top = 55.1
margin_right = 27.0
margin_bottom = 79.1
text = "Cylinder"

[node name="CheckBox4" type="CheckBox" parent="Control"]
margin_left = 3.0
margin_top = 74.118
margin_right = 27.0
margin_bottom = 98.118
pressed = true
text = "Capsule"

[node name="Label" type="Label" parent="Control"]
margin_left = 25.0
margin_top = 3.763
margin_right = 268.0
margin_bottom = 17.763
text = "Control: Arrow + Mouse (click + move)"

[node name="Label2" type="Label" parent="Control"]
margin_left = 5.0
margin_top = 177.103
margin_right = 103.0
margin_bottom = 191.103
text = "Clouds params:"

[node name="Label3" type="Label" parent="Control"]
margin_left = 5.0
margin_top = 215.469
margin_right = 73.0
margin_bottom = 229.469
text = "COVERAGE"

[node name="HScrollBar" type="HScrollBar" parent="Control/Label3"]
margin_left = 5.0
margin_top = 17.2915
margin_right = 145.0
margin_bottom = 30.2915
value = 50.0

[node name="Label4" type="Label" parent="Control"]
margin_left = 5.0
margin_top = 250.052
margin_right = 90.0
margin_bottom = 264.052
text = "ABSORPTION"

[node name="HScrollBar" type="HScrollBar" parent="Control/Label4"]
margin_left = 5.0
margin_top = 17.2916
margin_right = 145.0
margin_bottom = 29.2916
value = 10.0

[node name="Label5" type="Label" parent="Control"]
margin_left = 5.0
margin_top = 291.66
margin_right = 105.0
margin_bottom = 305.66
text = "THICKNESS"

[node name="HScrollBar" type="HScrollBar" parent="Control/Label5"]
margin_left = 5.0
margin_top = 16.2108
margin_right = 145.0
margin_bottom = 28.2108
value = 25.0

[node name="Label6" type="Label" parent="Control"]
margin_left = 5.0
margin_top = 326.14
margin_right = 82.0
margin_bottom = 340.14
text = "STEPS (1-100)"

[node name="HScrollBar" type="HScrollBar" parent="Control/Label6"]
margin_left = 5.0
margin_top = 16.2108
margin_right = 145.0
margin_bottom = 28.2108
value = 25.0

[connection signal="pressed" from="Control/CheckBox" to="full_refl" method="rotate_check"]
[connection signal="pressed" from="Control/CheckBox2" to="full_refl" method="set_visible_obj" binds= [ 0 ]]
[connection signal="pressed" from="Control/CheckBox2" to="Control" method="cb_press1"]
[connection signal="pressed" from="Control/CheckBox3" to="full_refl" method="set_visible_obj" binds= [ 1 ]]
[connection signal="pressed" from="Control/CheckBox3" to="Control" method="cb_press2"]
[connection signal="pressed" from="Control/CheckBox4" to="full_refl" method="set_visible_obj" binds= [ 2 ]]
[connection signal="pressed" from="Control/CheckBox4" to="Control" method="cb_press3"]
[connection signal="gui_input" from="Control/Label3/HScrollBar" to="scene_cam" method="set_ui_input"]
[connection signal="value_changed" from="Control/Label3/HScrollBar" to="Sky/Sprite" method="cov_scb"]
[connection signal="gui_input" from="Control/Label4/HScrollBar" to="scene_cam" method="set_ui_input"]
[connection signal="value_changed" from="Control/Label4/HScrollBar" to="Sky/Sprite" method="absb_scb"]
[connection signal="gui_input" from="Control/Label5/HScrollBar" to="scene_cam" method="set_ui_input"]
[connection signal="value_changed" from="Control/Label5/HScrollBar" to="Sky/Sprite" method="thick_scb"]
[connection signal="gui_input" from="Control/Label6/HScrollBar" to="scene_cam" method="set_ui_input"]
[connection signal="value_changed" from="Control/Label6/HScrollBar" to="Sky/Sprite" method="step_scb"]
