Skip to content

Commit

Permalink
Switch swimming-pool from CSG to GLB mesh.
Browse files Browse the repository at this point in the history
  • Loading branch information
Malcolmnixon committed Sep 22, 2024
1 parent 40618ac commit aafa980
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 102 deletions.
8 changes: 4 additions & 4 deletions assets/wahooney.itch.io/brown_grid_triplanar.tres
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=2]
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://bv2a25s3juvpq"]

[ext_resource path="res://assets/wahooney.itch.io/brown_grid.png" type="Texture2D" id=1]
[ext_resource type="Texture2D" uid="uid://bskwc0drdadnd" path="res://assets/wahooney.itch.io/brown_grid.png" id="1"]

[resource]
albedo_texture = ExtResource( 1 )
uv1_scale = Vector3( 0.5, 0.5, 0.5 )
albedo_texture = ExtResource("1")
uv1_scale = Vector3(0.25, 0.25, 0.25)
uv1_triplanar = true
10 changes: 10 additions & 0 deletions assets/wahooney.itch.io/white_grid_triplanar.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://df8n6yyq0iq8r"]

[ext_resource type="Texture2D" uid="uid://cqgdloakbawp" path="res://assets/wahooney.itch.io/white_grid.png" id="1_hsc4y"]

[resource]
diffuse_mode = 1
albedo_texture = ExtResource("1_hsc4y")
roughness = 0.8
uv1_scale = Vector3(0.25, 0.25, 0.25)
uv1_triplanar = true
82 changes: 44 additions & 38 deletions scenes/main_menu/main_menu_level.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=53 format=3 uid="uid://037lluf8eoy6"]
[gd_scene load_steps=54 format=3 uid="uid://037lluf8eoy6"]

[ext_resource type="PackedScene" uid="uid://qbmx03iibuuu" path="res://addons/godot-xr-tools/staging/scene_base.tscn" id="1"]
[ext_resource type="Script" path="res://scenes/main_menu/main_menu_level.gd" id="2_taoax"]
Expand Down Expand Up @@ -40,66 +40,67 @@
[ext_resource type="Texture2D" uid="uid://v4807nasx1dc" path="res://scenes/sprinting_demo/sprinting_demo.png" id="29_h1jn0"]
[ext_resource type="Texture2D" uid="uid://cr1l4g7btdyht" path="res://scenes/origin_gravity_demo/origin_gravity_demo.png" id="32_c4n1q"]
[ext_resource type="Texture2D" uid="uid://dhd30j0xpcxoi" path="res://scenes/sphere_world_demo/sphere_world_demo.png" id="34_xw8ig"]
[ext_resource type="Texture2D" uid="uid://dd2u7l7q2de65" path="res://scenes/swim_demo/swim demo.png" id="40_i3riy"]

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_sj2ko"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_rnrm6"]
animation = &"Grip"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6aaih"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ntjp1"]
animation = &"Grip"

[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_brcrv"]
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_50hdn"]
filter_enabled = true
filters = ["Armature/Skeleton3D:Little_Distal_L", "Armature/Skeleton3D:Little_Intermediate_L", "Armature/Skeleton3D:Little_Metacarpal_L", "Armature/Skeleton3D:Little_Proximal_L", "Armature/Skeleton3D:Middle_Distal_L", "Armature/Skeleton3D:Middle_Intermediate_L", "Armature/Skeleton3D:Middle_Metacarpal_L", "Armature/Skeleton3D:Middle_Proximal_L", "Armature/Skeleton3D:Ring_Distal_L", "Armature/Skeleton3D:Ring_Intermediate_L", "Armature/Skeleton3D:Ring_Metacarpal_L", "Armature/Skeleton3D:Ring_Proximal_L", "Armature/Skeleton3D:Thumb_Distal_L", "Armature/Skeleton3D:Thumb_Metacarpal_L", "Armature/Skeleton3D:Thumb_Proximal_L", "Armature/Skeleton:Little_Distal_L", "Armature/Skeleton:Little_Intermediate_L", "Armature/Skeleton:Little_Proximal_L", "Armature/Skeleton:Middle_Distal_L", "Armature/Skeleton:Middle_Intermediate_L", "Armature/Skeleton:Middle_Proximal_L", "Armature/Skeleton:Ring_Distal_L", "Armature/Skeleton:Ring_Intermediate_L", "Armature/Skeleton:Ring_Proximal_L", "Armature/Skeleton:Thumb_Distal_L", "Armature/Skeleton:Thumb_Proximal_L"]

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_248ms"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3biqj"]
animation = &"Grip 5"

[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_2gkw7"]
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_8rubf"]
filter_enabled = true
filters = ["Armature/Skeleton3D:Index_Distal_L", "Armature/Skeleton3D:Index_Intermediate_L", "Armature/Skeleton3D:Index_Metacarpal_L", "Armature/Skeleton3D:Index_Proximal_L", "Armature/Skeleton:Index_Distal_L", "Armature/Skeleton:Index_Intermediate_L", "Armature/Skeleton:Index_Proximal_L"]

[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_mh5hs"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_yarx7"]
graph_offset = Vector2(-536, 11)
nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_sj2ko")
nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_rnrm6")
nodes/ClosedHand1/position = Vector2(-600, 300)
nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_6aaih")
nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_ntjp1")
nodes/ClosedHand2/position = Vector2(-360, 300)
nodes/Grip/node = SubResource("AnimationNodeBlend2_brcrv")
nodes/Grip/node = SubResource("AnimationNodeBlend2_50hdn")
nodes/Grip/position = Vector2(0, 20)
nodes/OpenHand/node = SubResource("AnimationNodeAnimation_248ms")
nodes/OpenHand/node = SubResource("AnimationNodeAnimation_3biqj")
nodes/OpenHand/position = Vector2(-600, 100)
nodes/Trigger/node = SubResource("AnimationNodeBlend2_2gkw7")
nodes/Trigger/node = SubResource("AnimationNodeBlend2_8rubf")
nodes/Trigger/position = Vector2(-360, 20)
node_connections = [&"Grip", 0, &"Trigger", &"Grip", 1, &"ClosedHand2", &"Trigger", 0, &"OpenHand", &"Trigger", 1, &"ClosedHand1", &"output", 0, &"Grip"]

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_s4vic"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_43aej"]
animation = &"Grip"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_70e5h"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_an6p5"]
animation = &"Grip"

[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_6pk6s"]
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_gs88d"]
filter_enabled = true
filters = ["Armature/Skeleton3D:Little_Distal_R", "Armature/Skeleton3D:Little_Intermediate_R", "Armature/Skeleton3D:Little_Metacarpal_R", "Armature/Skeleton3D:Little_Proximal_R", "Armature/Skeleton3D:Middle_Distal_R", "Armature/Skeleton3D:Middle_Intermediate_R", "Armature/Skeleton3D:Middle_Metacarpal_R", "Armature/Skeleton3D:Middle_Proximal_R", "Armature/Skeleton3D:Ring_Distal_R", "Armature/Skeleton3D:Ring_Intermediate_R", "Armature/Skeleton3D:Ring_Metacarpal_R", "Armature/Skeleton3D:Ring_Proximal_R", "Armature/Skeleton3D:Thumb_Distal_R", "Armature/Skeleton3D:Thumb_Metacarpal_R", "Armature/Skeleton3D:Thumb_Proximal_R", "Armature/Skeleton:Little_Distal_R", "Armature/Skeleton:Little_Intermediate_R", "Armature/Skeleton:Little_Proximal_R", "Armature/Skeleton:Middle_Distal_R", "Armature/Skeleton:Middle_Intermediate_R", "Armature/Skeleton:Middle_Proximal_R", "Armature/Skeleton:Ring_Distal_R", "Armature/Skeleton:Ring_Intermediate_R", "Armature/Skeleton:Ring_Proximal_R", "Armature/Skeleton:Thumb_Distal_R", "Armature/Skeleton:Thumb_Proximal_R"]

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_85bwh"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_nbjvw"]
animation = &"Grip 5"

[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_uijff"]
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_x4asf"]
filter_enabled = true
filters = ["Armature/Skeleton3D:Index_Distal_R", "Armature/Skeleton3D:Index_Intermediate_R", "Armature/Skeleton3D:Index_Metacarpal_R", "Armature/Skeleton3D:Index_Proximal_R", "Armature/Skeleton:Index_Distal_R", "Armature/Skeleton:Index_Intermediate_R", "Armature/Skeleton:Index_Proximal_R"]

[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_nh6hc"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_dpxq4"]
graph_offset = Vector2(-552.664, 107.301)
nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_s4vic")
nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_43aej")
nodes/ClosedHand1/position = Vector2(-600, 300)
nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_70e5h")
nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_an6p5")
nodes/ClosedHand2/position = Vector2(-360, 300)
nodes/Grip/node = SubResource("AnimationNodeBlend2_6pk6s")
nodes/Grip/node = SubResource("AnimationNodeBlend2_gs88d")
nodes/Grip/position = Vector2(0, 40)
nodes/OpenHand/node = SubResource("AnimationNodeAnimation_85bwh")
nodes/OpenHand/node = SubResource("AnimationNodeAnimation_nbjvw")
nodes/OpenHand/position = Vector2(-600, 100)
nodes/Trigger/node = SubResource("AnimationNodeBlend2_uijff")
nodes/Trigger/node = SubResource("AnimationNodeBlend2_x4asf")
nodes/Trigger/position = Vector2(-360, 40)
node_connections = [&"Grip", 0, &"Trigger", &"Grip", 1, &"ClosedHand2", &"Trigger", 0, &"OpenHand", &"Trigger", 1, &"ClosedHand1", &"output", 0, &"Grip"]

Expand Down Expand Up @@ -146,7 +147,7 @@ transform = Transform3D(0.999999, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)

[node name="AnimationTree" parent="XROrigin3D/LeftHand/LeftHand" index="1"]
root_node = NodePath("../Hand_low_L")
tree_root = SubResource("AnimationNodeBlendTree_mh5hs")
tree_root = SubResource("AnimationNodeBlendTree_yarx7")

[node name="FunctionPoseDetector" parent="XROrigin3D/LeftHand" index="1" instance=ExtResource("5_xgcrx")]

Expand Down Expand Up @@ -193,7 +194,7 @@ transform = Transform3D(0.999999, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)

[node name="AnimationTree" parent="XROrigin3D/RightHand/RightHand" index="1"]
root_node = NodePath("../Hand_low_R")
tree_root = SubResource("AnimationNodeBlendTree_nh6hc")
tree_root = SubResource("AnimationNodeBlendTree_dpxq4")

[node name="FunctionPoseDetector" parent="XROrigin3D/RightHand" index="1" instance=ExtResource("5_xgcrx")]

Expand Down Expand Up @@ -232,70 +233,75 @@ scene = "res://scenes/basic_movement_demo/basic_movement_demo.tscn"
title = ExtResource("10")

[node name="ToAudioDemo" parent="Demos" index="1" instance=ExtResource("9")]
transform = Transform3D(0.900969, 0, 0.433884, 0, 1, 0, -0.433884, 0, 0.900969, -4.33884, 0, -9.00969)
transform = Transform3D(0.913545, 0, 0.406737, 0, 1, 0, -0.406737, 0, 0.913545, -4.06737, 0, -9.13545)
scene = "res://scenes/audio_demo/audio_demo.tscn"
title = ExtResource("14_gocl4")

[node name="ToTeleportDemo" parent="Demos" index="2" instance=ExtResource("9")]
transform = Transform3D(0.62349, 0, 0.781832, 0, 1, 0, -0.781832, 0, 0.62349, -7.81832, 0, -6.2349)
transform = Transform3D(0.669131, 0, 0.743145, 0, 1, 0, -0.743145, 0, 0.669131, -7.43145, 0, -6.69131)
scene = "res://scenes/teleport_demo/teleport_demo.tscn"
title = ExtResource("12")

[node name="ToWorldGrabDemo" parent="Demos" index="3" instance=ExtResource("9")]
transform = Transform3D(0.222521, 0, 0.974928, 0, 1, 0, -0.974928, 0, 0.222521, -9.74928, 0, -2.22521)
transform = Transform3D(0.309017, 0, 0.951057, 0, 1, 0, -0.951057, 0, 0.309017, -9.51057, 0, -3.09017)
scene = "res://scenes/world_grab_demo/world_grab_demo.tscn"
title = ExtResource("19_atnye")

[node name="ToClimbingGlidingDemo" parent="Demos" index="4" instance=ExtResource("9")]
transform = Transform3D(-0.222521, 0, 0.974928, 0, 1, 0, -0.974928, 0, -0.222521, -9.74928, 0, 2.22521)
transform = Transform3D(-0.104529, 0, 0.994522, 0, 1, 0, -0.994522, 0, -0.104529, -9.94522, 0, 1.04529)
scene = "res://scenes/climbing_gliding_demo/climbing_gliding_demo.tscn"
title = ExtResource("13")

[node name="ToGrapplingDemo" parent="Demos" index="5" instance=ExtResource("9")]
transform = Transform3D(-0.62349, 0, 0.781832, 0, 1, 0, -0.781832, 0, -0.62349, -7.81832, 0, 6.2349)
transform = Transform3D(-0.5, 0, 0.866025, 0, 1, 0, -0.866025, 0, -0.5, -8.66025, 0, 5)
scene = "res://scenes/grappling_demo/grappling_demo.tscn"
title = ExtResource("16")

[node name="ToInteractablesDemo" parent="Demos" index="6" instance=ExtResource("9")]
transform = Transform3D(-0.900969, 0, 0.433884, 0, 1, 0, -0.433884, 0, -0.900969, -4.33884, 0, 9.00969)
transform = Transform3D(-0.809017, 0, 0.587785, 0, 1, 0, -0.587785, 0, -0.809017, -5.87785, 0, 8.09017)
scene = "res://scenes/interactables_demo/interactables_demo.tscn"
title = ExtResource("17")

[node name="ToPointerDemo" parent="Demos" index="7" instance=ExtResource("9")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 8.74228e-07, 0, 10)
transform = Transform3D(-0.978148, 0, 0.207912, 0, 1, 0, -0.207912, 0, -0.978148, -2.07912, 0, 9.78148)
scene = "res://scenes/pointer_demo/pointer_demo.tscn"
title = ExtResource("20")

[node name="ToPickableDemo" parent="Demos" index="8" instance=ExtResource("9")]
transform = Transform3D(-0.900969, 0, -0.433884, 0, 1, 0, 0.433884, 0, -0.900969, 4.33884, 0, 9.00969)
transform = Transform3D(-0.978148, 0, -0.207912, 0, 1, 0, 0.207912, 0, -0.978148, 2.07912, 0, 9.78148)
scene = "res://scenes/pickable_demo/pickable_demo.tscn"
title = ExtResource("22")

[node name="ToPokeDemo" parent="Demos" index="9" instance=ExtResource("9")]
transform = Transform3D(-0.62349, 0, -0.781832, 0, 1, 0, 0.781832, 0, -0.62349, 7.81832, 0, 6.2349)
transform = Transform3D(-0.809017, 0, -0.587785, 0, 1, 0, 0.587785, 0, -0.809017, 5.87785, 0, 8.09017)
scene = "res://scenes/poke_demo/poke_demo.tscn"
title = ExtResource("25_rg3rn")

[node name="ToRumbleDemo" parent="Demos" index="10" instance=ExtResource("9")]
transform = Transform3D(-0.222521, 0, -0.974928, 0, 1, 0, 0.974928, 0, -0.222521, 9.74928, 0, 2.22521)
transform = Transform3D(-0.5, 0, -0.866025, 0, 1, 0, 0.866025, 0, -0.5, 8.66025, 0, 5)
scene = "res://scenes/rumble_demo/rumble_demo.tscn"
title = ExtResource("26_sg1pa")

[node name="ToSprintDemo" parent="Demos" index="11" instance=ExtResource("9")]
transform = Transform3D(0.222521, 0, -0.974928, 0, 1, 0, 0.974928, 0, 0.222521, 9.74928, 0, -2.22521)
transform = Transform3D(-0.104528, 0, -0.994522, 0, 1, 0, 0.994522, 0, -0.104528, 9.94522, 0, 1.04528)
scene = "res://scenes/sprinting_demo/sprinting_demo.tscn"
title = ExtResource("29_h1jn0")

[node name="ToOriginGravityDemo" parent="Demos" index="12" instance=ExtResource("9")]
transform = Transform3D(0.62349, 0, -0.781832, 0, 1, 0, 0.781832, 0, 0.62349, 7.81832, 0, -6.2349)
transform = Transform3D(0.309017, 0, -0.951056, 0, 1, 0, 0.951056, 0, 0.309017, 9.51056, 0, -3.09017)
scene = "res://scenes/origin_gravity_demo/origin_gravity_demo.tscn"
title = ExtResource("32_c4n1q")

[node name="ToSphereWorldDemo" parent="Demos" index="13" instance=ExtResource("9")]
transform = Transform3D(0.900969, 0, -0.433884, 0, 1, 0, 0.433884, 0, 0.900969, 4.33884, 0, -9.00969)
transform = Transform3D(0.669131, 0, -0.743145, 0, 1, 0, 0.743145, 0, 0.669131, 7.43145, 0, -6.69131)
scene = "res://scenes/sphere_world_demo/sphere_world_demo.tscn"
title = ExtResource("34_xw8ig")

[node name="ToSwimmingDemo" parent="Demos" index="14" instance=ExtResource("9")]
transform = Transform3D(0.913546, 0, -0.406736, 0, 1, 0, 0.406736, 0, 0.913546, 4.06736, 0, -9.13546)
scene = "res://scenes/swim_demo/swim_demo.tscn"
title = ExtResource("40_i3riy")

[node name="SettingsUI" parent="." index="3" instance=ExtResource("26_0uyxa")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.5)

Expand Down
Binary file added scenes/swim_demo/objects/pool.glb
Binary file not shown.
34 changes: 34 additions & 0 deletions scenes/swim_demo/objects/pool.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dlqc6gt45lgbe"
path="res://.godot/imported/pool.glb-ecae400b9491d3660f646a7fb6541e7f.scn"

[deps]

source_file="res://scenes/swim_demo/objects/pool.glb"
dest_files=["res://.godot/imported/pool.glb-ecae400b9491d3660f646a7fb6541e7f.scn"]

[params]

nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=0
63 changes: 14 additions & 49 deletions scenes/swim_demo/objects/swim_map.tscn
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[gd_scene load_steps=6 format=3 uid="uid://bjuel0yobnb7l"]
[gd_scene load_steps=7 format=3 uid="uid://bjuel0yobnb7l"]

[ext_resource type="Material" path="res://assets/wahooney.itch.io/green_grid_triplanar.tres" id="1_isyto"]
[ext_resource type="Material" path="res://assets/wahooney.itch.io/brown_grid_triplanar.tres" id="2_bp8ee"]

[sub_resource type="QuadMesh" id="7"]
size = Vector2(96, 96)
[ext_resource type="Material" uid="uid://cewxwlcx1csqy" path="res://assets/wahooney.itch.io/green_grid_triplanar.tres" id="1_isyto"]
[ext_resource type="Material" uid="uid://bv2a25s3juvpq" path="res://assets/wahooney.itch.io/brown_grid_triplanar.tres" id="2_bp8ee"]
[ext_resource type="PackedScene" uid="uid://dlqc6gt45lgbe" path="res://scenes/swim_demo/objects/pool.glb" id="3_pw4d0"]
[ext_resource type="Material" uid="uid://df8n6yyq0iq8r" path="res://assets/wahooney.itch.io/white_grid_triplanar.tres" id="4_k7u7d"]

[sub_resource type="QuadMesh" id="8"]
size = Vector2(96, 16)
Expand All @@ -18,49 +17,6 @@ size = Vector3(100, 16, 2)
transform = Transform3D(0.866025, -0.321394, 0.383022, 0, 0.766044, 0.642788, -0.5, -0.55667, 0.663414, 0, 5, 0)
light_energy = 0.8

[node name="CSGCombiner3D" type="CSGCombiner3D" parent="."]
use_collision = true

[node name="CSGMesh3D" type="CSGMesh3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0)
mesh = SubResource("7")
material = ExtResource("1_isyto")

[node name="CSGBox3D" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2, -12)
size = Vector3(8, 4, 16)
material = ExtResource("2_bp8ee")

[node name="CSGBox3D2" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.7, -12)
operation = 2
size = Vector3(6, 3.6, 14)
material = ExtResource("2_bp8ee")

[node name="CSGBox3D3" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(0.642788, 0.766045, 0, -0.766045, 0.642788, 0, 0, 0, 1, 3.1, 0, -12)
operation = 2
size = Vector3(1, 1.4, 14)
material = ExtResource("2_bp8ee")

[node name="CSGBox3D4" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(0.766045, 0.642788, 0, -0.642788, 0.766045, 0, 0, 0, 1, -3.1, 0, -12)
operation = 2
size = Vector3(1.4, 1, 14)
material = ExtResource("2_bp8ee")

[node name="CSGBox3D5" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(-3.09086e-08, -3.09086e-08, -1, -0.766045, 0.642788, 3.8097e-09, 0.642788, 0.766045, -4.35451e-08, -1.31134e-07, 0, -4.9)
operation = 2
size = Vector3(1, 1.4, 6)
material = ExtResource("2_bp8ee")

[node name="CSGBox3D6" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(-3.09086e-08, -3.09086e-08, -1, -0.642788, 0.766045, -3.8097e-09, 0.766045, 0.642788, -4.35451e-08, 1.31134e-07, 0, -19.1)
operation = 2
size = Vector3(1.4, 1, 6)
material = ExtResource("2_bp8ee")

[node name="Wall1" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -48)

Expand Down Expand Up @@ -112,3 +68,12 @@ surface_material_override/0 = ExtResource("1_isyto")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Wall4"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 8, -1)
shape = SubResource("4")

[node name="pool" parent="." instance=ExtResource("3_pw4d0")]

[node name="Pool" parent="pool" index="4"]
surface_material_override/0 = ExtResource("1_isyto")
surface_material_override/1 = ExtResource("4_k7u7d")
surface_material_override/2 = ExtResource("2_bp8ee")

[editable path="pool"]
9 changes: 9 additions & 0 deletions scenes/swim_demo/objects/water_shader.gdshader
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ uniform float alpha = 0.7;
// Noise scale and texture
uniform float scale = 0.05;
uniform sampler2D normal_texture;
uniform sampler2D wave_texture;

void vertex() {
// Get the world X/Z coordinates
vec2 world = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xz;
float noise = texture(wave_texture, world + TIME / 5.0).r;

VERTEX.y += noise * 0.2;
}

void fragment() {
// Get the world X/Z coordinates
Expand Down
Loading

0 comments on commit aafa980

Please sign in to comment.