1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +08:00

Adjust with shader changes

This commit is contained in:
smoogipoo 2019-03-07 18:30:18 +09:00
parent e430b8a640
commit 04d756524d
5 changed files with 12 additions and 12 deletions

View File

@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
{
private int currentIndex;
private Shader shader;
private IShader shader;
private Texture texture;
private Vector2 size => texture.Size * Scale;
@ -79,7 +79,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
[BackgroundDependencyLoader]
private void load(ShaderManager shaders, TextureStore textures)
{
shader = shaders?.Load(@"CursorTrail", FragmentShaderDescriptor.TEXTURE);
shader = shaders.Load(@"CursorTrail", FragmentShaderDescriptor.TEXTURE);
texture = textures.Get(@"Cursor/cursortrail");
Scale = new Vector2(1 / texture.ScaleAdjust);
}
@ -167,7 +167,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
private class TrailDrawNode : DrawNode
{
public Shader Shader;
public IShader Shader;
public Texture Texture;
public float Time;

View File

@ -64,7 +64,7 @@ namespace osu.Game.Graphics.Backgrounds
private readonly SortedList<TriangleParticle> parts = new SortedList<TriangleParticle>(Comparer<TriangleParticle>.Default);
private Shader shader;
private IShader shader;
private readonly Texture texture;
public Triangles()
@ -75,7 +75,7 @@ namespace osu.Game.Graphics.Backgrounds
[BackgroundDependencyLoader]
private void load(ShaderManager shaders)
{
shader = shaders?.Load(VertexShaderDescriptor.TEXTURE_2, FragmentShaderDescriptor.TEXTURE_ROUNDED);
shader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, FragmentShaderDescriptor.TEXTURE_ROUNDED);
}
protected override void LoadComplete()
@ -196,7 +196,7 @@ namespace osu.Game.Graphics.Backgrounds
private class TrianglesDrawNode : DrawNode
{
public Shader Shader;
public IShader Shader;
public Texture Texture;
public readonly List<TriangleParticle> Parts = new List<TriangleParticle>();

View File

@ -61,7 +61,7 @@ namespace osu.Game.Rulesets.Mods
public abstract class Flashlight : Drawable
{
internal BindableInt Combo;
private Shader shader;
private IShader shader;
protected override DrawNode CreateDrawNode() => new FlashlightDrawNode();
@ -139,7 +139,7 @@ namespace osu.Game.Rulesets.Mods
private class FlashlightDrawNode : DrawNode
{
public Shader Shader;
public IShader Shader;
public Quad ScreenSpaceDrawQuad;
public Vector2 FlashlightPosition;
public Vector2 FlashlightSize;

View File

@ -89,7 +89,7 @@ namespace osu.Game.Screens
/// </summary>
public class ShaderPrecompiler : Drawable
{
private readonly List<Shader> loadTargets = new List<Shader>();
private readonly List<IShader> loadTargets = new List<IShader>();
public bool FinishedCompiling { get; private set; }
@ -106,7 +106,7 @@ namespace osu.Game.Screens
loadTargets.Add(manager.Load(VertexShaderDescriptor.TEXTURE_3, FragmentShaderDescriptor.TEXTURE));
}
protected virtual bool AllLoaded => loadTargets.All(s => s.Loaded);
protected virtual bool AllLoaded => loadTargets.All(s => s.IsLoaded);
protected override void Update()
{

View File

@ -63,7 +63,7 @@ namespace osu.Game.Screens.Menu
private readonly float[] frequencyAmplitudes = new float[256];
private Shader shader;
private IShader shader;
private readonly Texture texture;
public LogoVisualisation()
@ -146,7 +146,7 @@ namespace osu.Game.Screens.Menu
private class VisualisationDrawNode : DrawNode
{
public Shader Shader;
public IShader Shader;
public Texture Texture;
//Asuming the logo is a circle, we don't need a second dimension.