From f8fbea9cc6dd69cf74a56c2fc41b0ba6c3362265 Mon Sep 17 00:00:00 2001 From: Nathan Lovato <12694995+NathanLovato@users.noreply.github.com> Date: Mon, 11 Jul 2022 14:41:17 +0200 Subject: [PATCH] chore: add missing anchors for shader secrets course --- godot/Shaders/interactive_snow.shader | 7 +++---- godot/Shaders/stylized_waterfall.shader | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/godot/Shaders/interactive_snow.shader b/godot/Shaders/interactive_snow.shader index 1091ebf..7f1c78c 100644 --- a/godot/Shaders/interactive_snow.shader +++ b/godot/Shaders/interactive_snow.shader @@ -13,7 +13,7 @@ uniform sampler2D dirt_texture: hint_albedo; uniform sampler2D dirt_texture_normal: hint_normal; uniform sampler2D dirt_texture_roughness; uniform sampler2D blend_texture; -// ANCHOR: textures +// END: textures uniform float snow_height = 0.3; uniform float snow_sharpness: hint_range(0.3, 20.0, 0.1) = 3.0; uniform vec2 textures_tiling = vec2(4.0); @@ -53,8 +53,7 @@ void fragment() { float dirt_roughness = texture(dirt_texture_roughness, world_uv_tiled).r; float noise_interp = texture(blend_texture, world_uv_tiled * 0.7).r; // END: sampling - // ANCHOR: overlay - // overlay overlay_blend_mode + // ANCHOR: overlay_blend_mode float snow_interp = mix( mask * noise_interp * 2.0, 1.0 - 2.0 * (1.0 - mask) * (1.0 - noise_interp), @@ -70,4 +69,4 @@ void fragment() { ROUGHNESS = mix(dirt_roughness, snow_rougness, snow_interp); // END: mix } -// END: all \ No newline at end of file +// END: all diff --git a/godot/Shaders/stylized_waterfall.shader b/godot/Shaders/stylized_waterfall.shader index b7c376c..548ae9b 100644 --- a/godot/Shaders/stylized_waterfall.shader +++ b/godot/Shaders/stylized_waterfall.shader @@ -100,7 +100,7 @@ void fragment() { // ANCHOR: linear_depth float depth_delta = VERTEX.z - view_depth.z; // END: linear_depth - // ANCHOR: depth_noramlized + // ANCHOR: depth_normalized float depth_normalized = smoothstep(0.0, max_depth, depth_delta); // END: depth_normalized // ANCHOR: water_color @@ -166,4 +166,4 @@ void fragment() { ALPHA = mix(water_color, foam_color, foam_factor).a; // END: albedo } -} \ No newline at end of file +}