forked from Misaki/GhostEngine
Add high-performance material/shader system (Ghost.Shader.Concept)
Introduces a new Ghost.Shader.Concept project implementing a modern, data-oriented material and shader system with: - Global/local keyword bitsets (fast O(1) ops, 64 bytes) - Multi-pass shader program and per-pass render state overrides - Thread-safe, 16-byte aligned material property blocks - Material pooling to reduce GC pressure - Batch renderer for efficient PSO grouping and async variant warmup - Full demo (Program.cs) and extensive documentation (ARCHITECTURE.md, README.md, PROJECT_SUMMARY.md) - Minor integration: new enums, doc updates, and keyword handling in existing code No breaking changes to the existing engine; all new code is isolated. This serves as a reference implementation for high-performance, extensible material/shader architectures.
This commit is contained in:
@@ -101,7 +101,7 @@ internal class WorldNodeSerializer : CustomSerializer<WorldNode>
|
||||
//foreach (var componentElement in element.GetProperty(Property.COMPONENTS).EnumerateObject())
|
||||
//{
|
||||
// var typeName = componentElement.Name;
|
||||
// var type = Type.GetType(typeName) ?? throw new Exception($"Type {typeName} not found.");
|
||||
// var space = Type.GetType(typeName) ?? throw new Exception($"Type {typeName} not found.");
|
||||
|
||||
// foreach (var dataElement in componentElement.Value.EnumerateArray())
|
||||
// {
|
||||
@@ -109,10 +109,10 @@ internal class WorldNodeSerializer : CustomSerializer<WorldNode>
|
||||
// var entity = new Entity(entityID, 0);
|
||||
|
||||
// var dataProperty = dataElement.GetProperty(Property.DATA);
|
||||
// var component = JsonSerializer.Deserialize(dataProperty.GetRawText(), type, options);
|
||||
// var component = JsonSerializer.Deserialize(dataProperty.GetRawText(), space, options);
|
||||
// if (component is IComponent data)
|
||||
// {
|
||||
// world.EntityManager.AddComponent(entity, data, type);
|
||||
// world.EntityManager.AddComponent(entity, data, space);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user