-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// Copyright (c) andy840119 <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using osu.Framework.Graphics.OpenGL.Buffers; | ||
using osu.Framework.Graphics.Textures; | ||
using osuTK; | ||
|
@@ -20,6 +21,8 @@ public class RepeatMovingBackgroundShader : InternalShader, IApplicableToCurrent | |
|
||
public Vector2 Speed { get; set; } | ||
|
||
public float Mix { get; set; } = 1f; | ||
|
||
public RepeatMovingBackgroundShader(IShader originShader) | ||
: base(originShader) | ||
{ | ||
|
@@ -52,6 +55,9 @@ public override void ApplyValue(FrameBuffer current) | |
|
||
var speed = Speed; | ||
GetUniform<Vector2>("g_Speed").UpdateValue(ref speed); | ||
|
||
var mix = Math.Clamp(Mix, 0, 1); | ||
GetUniform<float>(@"g_Mix").UpdateValue(ref mix); | ||
} | ||
|
||
public void ApplyCurrentTime(float currentTime) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters