summaryrefslogtreecommitdiffstats
path: root/water/Water.tscn
blob: 27377a9d0d5f93f43cc6fca235889ef41f11feb3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[gd_scene load_steps=9 format=2]

[ext_resource path="res://water/Wave.gdshader" type="Shader" id=1]
[ext_resource path="res://water/Water.gd" type="Script" id=2]

[sub_resource type="PlaneMesh" id=9]
size = Vector2( 2000, 2000 )
subdivide_width = 500
subdivide_depth = 500

[sub_resource type="OpenSimplexNoise" id=17]

[sub_resource type="NoiseTexture" id=18]
seamless = true
as_normalmap = true
noise = SubResource( 17 )

[sub_resource type="ShaderMaterial" id=11]
shader = ExtResource( 1 )
shader_param/wave1 = Quat( 0.25, 0.10472, 2.38732, 203.957 )
shader_param/wave1_dir = Vector2( 1, 1 )
shader_param/wave2 = Quat( 0.25, 0.202683, 1.23345, 146.603 )
shader_param/wave2_dir = Vector2( 1, 0.6 )
shader_param/wave3 = Quat( 0.25, 0.349066, 0.716197, 111.712 )
shader_param/wave3_dir = Vector2( 1, 1.3 )
shader_param/water_colour = Color( 0.694118, 0.945098, 0.941176, 0.368627 )
shader_param/deep_water_colour = Color( 0.25098, 0.623529, 0.788235, 0.54902 )
shader_param/foam_amount = 0.6
shader_param/murkiness = 4.0
shader_param/refraction_amount = 0.01
shader_param/noise = SubResource( 18 )

[sub_resource type="PlaneMesh" id=19]
size = Vector2( 10000, 10000 )
subdivide_width = 100
subdivide_depth = 100

[sub_resource type="PlaneMesh" id=20]
size = Vector2( 2000, 2000 )

[node name="Water" type="Spatial"]

[node name="MeshInstance" type="MeshInstance" parent="."]
layers = 2
mesh = SubResource( 9 )
material/0 = SubResource( 11 )
script = ExtResource( 2 )
wave1_steepness = 0.25
wave1_wavelength = 60.0
wave1_direction = Vector2( 1, 1 )
wave2_steepness = 0.25
wave2_wavelength = 31.0
wave2_direction = Vector2( 1, 0.6 )
wave3_steepness = 0.25
wave3_wavelength = 18.0
wave3_direction = Vector2( 1, 1.3 )

[node name="CSGMesh" type="CSGMesh" parent="."]
layers = 2
mesh = SubResource( 19 )
material = SubResource( 11 )

[node name="CSGMesh" type="CSGMesh" parent="CSGMesh"]
layers = 2
operation = 2
mesh = SubResource( 20 )