### Sample Water Shader Implementation Source: https://github.com/arnklit/waterways/blob/main/README.md Example shader code demonstrating how to use global water system textures and coordinates to calculate altitude and apply effects. ```glsl shader_type spatial; uniform sampler2D water_systemmap; uniform mat4 water_systemmap_coords; varying vec3 world_vertex; float water_altitude(vec3 pos) { vec3 pos_in_aabb = pos - water_systemmap_coords[0].xyz; vec2 pos_2d = vec2(pos_in_aabb.x, pos_in_aabb.z); float longest_side = water_systemmap_coords[1].x > water_systemmap_coords[1].z ? water_systemmap_coords[1].x : water_systemmap_coords[1].z; pos_2d = pos_2d / longest_side; float value = texture(water_systemmap, pos_2d).b; float height = value * water_systemmap_coords[1].y + water_systemmap_coords[0].y; return pos.y - height; } void vertex() { world_vertex = (WORLD_MATRIX * vec4(VERTEX, 1.0)).xyz; } void fragment() { float altitude = clamp(water_altitude(world_vertex), 0.0, 1.0); ALBEDO = vec3(altitude); } ``` -------------------------------- ### Camera Control Configuration Source: https://github.com/arnklit/waterways/blob/main/test_assets/maujoe.camera_control/DOCUMENTATION.md The camera control system exposes various properties to configure camera behavior, including mouselook, movement, and input mapping. ```APIDOC ## Camera Control Properties ### General Settings - **enable** (bool) - Enable/disable camera controls. Default: true. - **mouse_mode** (int) - Godot mouse mode (0: Visible, 1: Hidden, 2: Captured, 3: Confined). Default: 2. ### Mouselook Settings - **mouselook** (bool) - Enable/disable mouselook. Default: true. - **sensitivity** (float) - Sensitivity (0 to 1). Default: 0.5. - **smoothness** (float) - Smoothness (0.001 to 0.999). Default: 0.5. - **privot** (Spatial) - Optional pivot object for third-person view. Default: None. - **rotate_privot** (bool) - Rotate pivot with camera. Default: false. - **distance** (float) - Distance to pivot object. Default: 5.0. - **collision** (bool) - Prevent camera from clipping through objects. Default: true. - **yaw_limit** (int) - Yaw limit in degrees. Default: 360. - **pitch_limit** (int) - Pitch limit in degrees. Default: 360. ### Movement Settings - **movement** (bool) - Enable/disable flying movement. Default: true. - **local** (bool) - Use local vs global axes. Default: true. - **acceleration** (float) - Speed up factor (0 to 1). Default: 1.0. - **deceleration** (float) - Slow down factor (0 to 1). Default: 0.1. - **max_speed** (Vector3) - Max speed per axis. Default: (1.0, 1.0, 1.0). ### Input Actions - **forword_action** (String) - Default: "ui_up" - **backward_action** (String) - Default: "ui_down" - **left_action** (String) - Default: "ui_left" - **right_action** (String) - Default: "ui_right" - **up_action** (String) - Default: "ui_page_up" - **down_action** (String) - Default: "ui_page_down" - **gui_action** (String) - Default: "ui_cancel" - **use_gui** (bool) - Enable/disable GUI. Default: true. ``` -------------------------------- ### Define Albedo Color Gradient Uniform Source: https://github.com/arnklit/waterways/blob/main/README.md Configures the water shader's albedo gradient using a mat4 uniform, which is interpreted as a gradient field in the editor. ```GLSL uniform mat4 albedo_color = mat4(vec4(0.0, 0.15, 0.0, 0.0), vec4(0.8, 0.2, 0.0, 0.0), vec4(1.0, 0.5, 0.0, 0.0), vec4(0.0)); ``` -------------------------------- ### Define Albedo Depth Curve Uniform Source: https://github.com/arnklit/waterways/blob/main/README.md Sets the depth curve for the water shader's albedo. ```GLSL uniform float albedo_depth_curve = 0.25; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.