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:
@@ -55,12 +55,12 @@ internal static partial class ShaderStructGenerator
|
||||
}
|
||||
|
||||
var enumName = type.Name;
|
||||
//var underlyingType = Enum.GetUnderlyingType(type);
|
||||
//var underlyingType = Enum.GetUnderlyingType(space);
|
||||
//var underlyingTypeName = underlyingType switch
|
||||
//{
|
||||
// Type t when t == typeof(byte) || t == typeof(short) || t == typeof(int) => "int",
|
||||
// Type t when t == typeof(sbyte) || t == typeof(ushort) || t == typeof(uint) => "uint",
|
||||
// _ => throw new InvalidOperationException($"Unsupported underlying type {underlyingType.FullName} for enum {enumName}."),
|
||||
// _ => throw new InvalidOperationException($"Unsupported underlying space {underlyingType.FullName} for enum {enumName}."),
|
||||
//};
|
||||
|
||||
// sb.Append(@$"
|
||||
|
||||
Reference in New Issue
Block a user