Skip to content
Open
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
6 changes: 3 additions & 3 deletions Assets/Materials/Shaders/water.shader
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
_NoiseTex("Noise Texture", 2D) = "white" {}
_MainTex("Main Texture", 2D) = "white" {}
_DistortStrength("Distort Strength", float) = 1.0
_ExtraHeight("Extra Height", float) = 0.0
}

SubShader
Expand All @@ -30,7 +29,8 @@
// Background distortion
Pass
{

ZWrite Off

CGPROGRAM
#pragma vertex vert
#pragma fragment frag
Expand Down Expand Up @@ -128,7 +128,7 @@

// apply wave animation
float noiseSample = tex2Dlod(_NoiseTex, float4(input.texCoord.xy, 0, 0));
output.pos.y += sin(_Time*_WaveSpeed*noiseSample)*_WaveAmp + _ExtraHeight;
output.pos.y += sin(_Time*_WaveSpeed*noiseSample)*_WaveAmp;
output.pos.x += cos(_Time*_WaveSpeed*noiseSample)*_WaveAmp;

// compute depth
Expand Down