Implemented Materials

- Shaders get Textureslots via reflection
- added Textureslots to Effect
This commit is contained in:
Simon Lübeß
2021-08-09 18:03:47 +02:00
parent 2326e69c0c
commit 344accea60
10 changed files with 463 additions and 75 deletions
+11
View File
@@ -77,5 +77,16 @@ namespace GlitchyEngine.Renderer
geometry.Bind();
RenderCommand.DrawIndexed(geometry);
}
public static void Submit(GeometryBinding geometry, Material material, Matrix transform = .Identity)
{
material.SetVariable("ViewProjection", _sceneConstants.ViewProjection);
material.SetVariable("Transform", transform);
material.Bind(_context);
geometry.Bind();
RenderCommand.DrawIndexed(geometry);
}
}
}