Fixed compilation errors;
Added MaterialPalette
This commit is contained in:
@@ -7,8 +7,7 @@ namespace Ghost.Engine.Components;
|
||||
public struct MeshInstance : IComponent
|
||||
{
|
||||
public Handle<Mesh> mesh;
|
||||
// NOTE: This will be the first material, we can access other materials by the bindless index of the first material + the local index stored in the meshlet.
|
||||
public Handle<Material> materialStart;
|
||||
public int materialPaletteIndex;
|
||||
public ShadowCastingMode shadowCastingMode;
|
||||
public RenderingLayerMask renderingLayerMask;
|
||||
public bool staticShadowCaster;
|
||||
|
||||
@@ -42,9 +42,8 @@ public class RenderExtractionSystem : ISystem
|
||||
renderList.Add(new RenderRecord
|
||||
{
|
||||
localToWorld = localToWorld.matrix,
|
||||
// TODO: Get mesh and material from palette. This requires some changes to ISharedComponent since it's now fully functional right now.
|
||||
// mesh = meshInstance.meshIndex,
|
||||
// material = meshInstance.materialIndex,
|
||||
mesh = meshInstance.mesh,
|
||||
materialPaletteIndex = meshInstance.materialPaletteIndex,
|
||||
renderingLayerMask = meshInstance.renderingLayerMask,
|
||||
|
||||
}, 0);
|
||||
|
||||
Reference in New Issue
Block a user