feat(rendering): add Shader.SetFloat uniform setter

This commit is contained in:
2026-06-01 15:45:40 +02:00
parent 9410fee78b
commit 2e36d40386

View File

@@ -36,6 +36,9 @@ public sealed class Shader : IDisposable
public void SetInt(string name, int value) => public void SetInt(string name, int value) =>
GL.Uniform1(this.Location(name), value); GL.Uniform1(this.Location(name), value);
public void SetFloat(string name, float value) =>
GL.Uniform1(this.Location(name), value);
private int Location(string name) private int Location(string name)
{ {
if (this._uniforms.TryGetValue(name, out int location)) return location; if (this._uniforms.TryGetValue(name, out int location)) return location;