Skip to content

Commit

Permalink
chore: add missing anchors for shader secrets course
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanLovato committed Jul 11, 2022
1 parent 00aec55 commit f8fbea9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions godot/Shaders/interactive_snow.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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),
Expand All @@ -70,4 +69,4 @@ void fragment() {
ROUGHNESS = mix(dirt_roughness, snow_rougness, snow_interp);
// END: mix
}
// END: all
// END: all
4 changes: 2 additions & 2 deletions godot/Shaders/stylized_waterfall.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -166,4 +166,4 @@ void fragment() {
ALPHA = mix(water_color, foam_color, foam_factor).a;
// END: albedo
}
}
}

0 comments on commit f8fbea9

Please sign in to comment.