Skip to content

Commit

Permalink
Fixed the reflection on the underside of the water plane.
Browse files Browse the repository at this point in the history
  • Loading branch information
shanecelis committed Jan 4, 2019
1 parent 3b3ed4c commit 62fe29d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Shaders/Water.shader
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Shader "Unlit/Water"
// XXX This lerp is not working. If you provide 0 as its last argument or multiply by 0, it
// shows the reflectedColor. If however, you multiply its last argument by 0.00000001, you
// get a black surface.
fixed4 col = float4(lerp(reflectedColor, refractedColor, (1.0 - fresnel) * length(refractedRay)), 1.0);
fixed4 col = float4(lerp(reflectedColor, saturate(refractedColor), (1.0 - fresnel) * length(refractedRay)), 1.0);
// fixed4 col = float4(reflectedColor, 1);
// fixed4 col = float4(refractedColor, 1);
#else
Expand Down

0 comments on commit 62fe29d

Please sign in to comment.