Skip to content

Commit

Permalink
Fix two typos in code and scene display text
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanLovato committed Apr 18, 2021
1 parent 16c32a5 commit fc78d50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions godot/Demos/StylizedWaterfallDemo.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,8 @@ material/0 = null

[node name="DemoInterface" parent="." instance=ExtResource( 5 )]
text_bbcode = "This demo shows how to create a stylized waterfall.
In particular, this waterfall is created by leveraging UVs and vertex colors created in the modeling software (blender)
Because we useng carefully crafted UVs, we don't need to use flowmaps."
In particular, this waterfall is created by leveraging UVs and vertex colors created in the modeling software (blender).
Because we are using carefully crafted UVs, we don't need to use flowmaps."

[editable path="WaterfallMesh"]

[editable path="Demo3DEnvironment"]
4 changes: 2 additions & 2 deletions godot/Shaders/stylized_waterfall.shader
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ uniform float water_speed = 0.3;
uniform float displacement = 0.1;
uniform vec4 foam_color: hint_color = vec4(1.0);
uniform float foam_threshold = 0.3;
uniform float foam_detail_treshold = 0.7;
uniform float foam_detail_threshold = 0.7;
uniform float foam_detail_speed = 0.1;
uniform float foam_smoothness = 0.0;
uniform float max_depth = 0.3;
Expand Down Expand Up @@ -85,7 +85,7 @@ void fragment(){
float total_noise = (main_noise_value + detail_noise_value) * 0.5;
float foam_factor = smoothstep(0.0, foam_smoothness * (1.0 - foam_threshold), ((total_noise - foam_threshold) + main_foam_intensity * 0.1) * main_foam_intensity) ;
foam_factor = screen_mix(foam_factor, main_foam_intensity);
foam_factor += smoothstep(0.0, foam_smoothness * (1.0 - foam_threshold), ((detail_noise_value - foam_detail_treshold) + main_foam_intensity * 0.1)) ;
foam_factor += smoothstep(0.0, foam_smoothness * (1.0 - foam_threshold), ((detail_noise_value - foam_detail_threshold) + main_foam_intensity * 0.1)) ;
foam_factor = clamp(foam_factor, 0.0, 1.0);

vec4 water_color = texture(depth_color_curve, vec2(depth_normalized));
Expand Down

0 comments on commit fc78d50

Please sign in to comment.