From d5d0d12830766742f88449a1761e863efb4f5107 Mon Sep 17 00:00:00 2001 From: MrScautHD <65916181+MrScautHD@users.noreply.github.com> Date: Fri, 5 Jul 2024 22:27:42 +0200 Subject: [PATCH] Clean up --- src/Sparkle/CSharp/Effects/Types/PbrEffect.cs | 2 +- src/Sparkle/CSharp/Effects/Types/PixelizerEffect.cs | 10 +++++----- src/Sparkle/CSharp/Registries/Registry.cs | 5 +---- .../CSharp/Rendering/Models/ModelAnimationPlayer.cs | 1 + src/Sparkle/Sparkle.csproj | 1 - 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/Sparkle/CSharp/Effects/Types/PbrEffect.cs b/src/Sparkle/CSharp/Effects/Types/PbrEffect.cs index 14ee6eb..7dc35c5 100644 --- a/src/Sparkle/CSharp/Effects/Types/PbrEffect.cs +++ b/src/Sparkle/CSharp/Effects/Types/PbrEffect.cs @@ -12,7 +12,7 @@ namespace Sparkle.CSharp.Effects.Types; -// TODO: Optimize it more! +// TODO: Optimize it more! (FIX IT) public class PbrEffect : Effect { public GlVersion GlVersion { get; private set; } diff --git a/src/Sparkle/CSharp/Effects/Types/PixelizerEffect.cs b/src/Sparkle/CSharp/Effects/Types/PixelizerEffect.cs index a3b04ea..4b06dcf 100644 --- a/src/Sparkle/CSharp/Effects/Types/PixelizerEffect.cs +++ b/src/Sparkle/CSharp/Effects/Types/PixelizerEffect.cs @@ -11,9 +11,9 @@ public class PixelizerEffect : Effect { public int ResolutionLoc { get; private set; } public int PixelSizeLoc { get; private set; } - private Vector2 PixelSize; + public Vector2 PixelSize; - private Vector2 _pixelSize; + private Vector2 _oldPixelSize; /// /// Constructor for creating a PixelizerEffect object. @@ -37,9 +37,9 @@ public override void Apply(Material? material = default) { this.UpdateResolution(); } - if (RayMath.Vector2Equals(this.PixelSize, this._pixelSize) != 1) { - this.Shader.SetValue(this.PixelSizeLoc, this._pixelSize, ShaderUniformDataType.Vec2); - this._pixelSize = this.PixelSize; + if (RayMath.Vector2Equals(this.PixelSize, this._oldPixelSize) != 1) { + this.Shader.SetValue(this.PixelSizeLoc, this._oldPixelSize, ShaderUniformDataType.Vec2); + this._oldPixelSize = this.PixelSize; } } diff --git a/src/Sparkle/CSharp/Registries/Registry.cs b/src/Sparkle/CSharp/Registries/Registry.cs index e0a7f2b..3cee812 100644 --- a/src/Sparkle/CSharp/Registries/Registry.cs +++ b/src/Sparkle/CSharp/Registries/Registry.cs @@ -4,15 +4,12 @@ namespace Sparkle.CSharp.Registries; public abstract class Registry : Disposable { - public bool HasLoaded { get; private set; } public bool HasInitialized { get; private set; } /// /// Used for loading resources. /// - protected internal virtual void Load(ContentManager content) { - this.HasLoaded = true; - } + protected internal virtual void Load(ContentManager content) { } /// /// Used for Initializes objects. diff --git a/src/Sparkle/CSharp/Rendering/Models/ModelAnimationPlayer.cs b/src/Sparkle/CSharp/Rendering/Models/ModelAnimationPlayer.cs index 4866f5f..f7360e9 100644 --- a/src/Sparkle/CSharp/Rendering/Models/ModelAnimationPlayer.cs +++ b/src/Sparkle/CSharp/Rendering/Models/ModelAnimationPlayer.cs @@ -5,6 +5,7 @@ namespace Sparkle.CSharp.Rendering.Models; +// TODO: ADD GPU ANIMATIONS public class ModelAnimationPlayer { private Model _model; diff --git a/src/Sparkle/Sparkle.csproj b/src/Sparkle/Sparkle.csproj index bf2fadb..d9a9d83 100644 --- a/src/Sparkle/Sparkle.csproj +++ b/src/Sparkle/Sparkle.csproj @@ -31,7 +31,6 @@ -