Start of inheriting Materials, create material instance for getMaterial from scripts

This commit is contained in:
Simon Lübeß
2025-02-14 12:39:35 +01:00
parent aaed4199d3
commit 24295731f3
6 changed files with 66 additions and 17 deletions
+3
View File
@@ -3,6 +3,9 @@ using GlitchyEngine.Math;
namespace GlitchyEngine.Graphics;
/// <summary>
/// An <see cref="Asset"/> that represents how a surface should be rendered.
/// </summary>
public class Material : Asset
{
public void SetVariable(string name, float4 value)
+4
View File
@@ -10,6 +10,10 @@ public class MeshRenderer : Component
/// <summary>
/// Gets or sets the Material of this <see cref="MeshRenderer"/>.
/// </summary>
/// <remarks>
/// If you get the <see cref="Material"/> and it is not yet a runtime-instance,
/// a new runtime-instance will be created and returned in its place.
/// </remarks>
public Material Material
{
get
+4
View File
@@ -39,6 +39,10 @@ public class SpriteRenderer : Component
/// <summary>
/// Gets or sets the Material of this SpriteRenderer.
/// </summary>
/// <remarks>
/// If you get the <see cref="Material"/> and it is not yet a runtime-instance,
/// a new runtime-instance will be created and returned in its place.
/// </remarks>
public Material Material
{
get