Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion resources/Materials/ocean_material.tres
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ render_priority = 0
shader = ExtResource("1_1ltun")
shader_parameter/Normal_Depth = 1.0
shader_parameter/wave_height = 5.0
shader_parameter/invisible = false
7 changes: 1 addition & 6 deletions resources/Shaders/ocean_shader.gdshader
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Inspired by: https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-19-generic-refraction-simulation

shader_type spatial;
render_mode cull_back, specular_schlick_ggx, depth_prepass_alpha;
render_mode cull_back, specular_schlick_ggx;

// Varyings
varying vec2 vary_world_uv;
Expand All @@ -20,7 +20,6 @@ uniform float Normal_Depth;
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_linear_mipmap;
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_linear_mipmap;
uniform float wave_height;
uniform bool invisible;

const float WAVE_CONST = 6.28300;

Expand Down Expand Up @@ -82,10 +81,6 @@ void vertex() {
}

void fragment() {
if (invisible) {
discard;
}

vec3 normal = sample_wave_noise(ocean_normal_map);

NORMAL_MAP = normal;
Expand Down
Loading