Skip to content

Commit

Permalink
Merge pull request #1 from keijiro/develop
Browse files Browse the repository at this point in the history
Develop branch
  • Loading branch information
keijiro committed Aug 9, 2014
2 parents bca57d6 + 8be0f34 commit 7d48202
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Assets/SonarFx/Shader/SonarFx.shader
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ Shader "Hidden/SonarFX"
// Moving wave.
w -= _Time.y * _SonarWaveParams.w;

// Divide with the interval.
w = mod(w, _SonarWaveParams.z) / _SonarWaveParams.z;
// Get modulo (w % params.z / params.z)
w /= _SonarWaveParams.z;
w = w - floor(w);

// Make the gradient steeper.
float p = _SonarWaveParams.y;
Expand Down
4 changes: 2 additions & 2 deletions Assets/SonarFx/SonarFx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ void Awake()

void OnEnable()
{
camera.SetReplacementShader(shader, null);
GetComponent<Camera>().SetReplacementShader(shader, null);
Update();
}

void OnDisable()
{
camera.ResetReplacementShader();
GetComponent<Camera>().ResetReplacementShader();
}

void Update()
Expand Down
Binary file modified SonarFx.unitypackage
Binary file not shown.

0 comments on commit 7d48202

Please sign in to comment.