diff --git a/Rendering/Shader.cs b/Rendering/Shader.cs index 3d83aba..44f5155 100644 --- a/Rendering/Shader.cs +++ b/Rendering/Shader.cs @@ -38,11 +38,9 @@ public sealed class Shader : IDisposable private int Location(string name) { - if (!this._uniforms.TryGetValue(name, out int location)) - { - location = GL.GetUniformLocation(this._handle, name); - this._uniforms[name] = location; - } + if (this._uniforms.TryGetValue(name, out int location)) return location; + location = GL.GetUniformLocation(this._handle, name); + this._uniforms[name] = location; return location; }