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:
2025-12-26 19:19:30 +09:00
parent a89719bfc9
commit f988c34b3d
48 changed files with 3067 additions and 201 deletions

View File

@@ -54,11 +54,11 @@ internal class KeywordsBlock : IBlockParser<List<FunctionCallDeclaration>, List<
var group = new KeywordsGroup();
switch (keyword.name.lexeme)
{
case TokenLexicon.KnownFunctions.DYNAMIC:
group.type = KeywordType.Dynamic;
case TokenLexicon.KnownFunctions.LOCAL:
group.space = KeywordSpace.Local;
break;
case TokenLexicon.KnownFunctions.STATIC:
group.type = KeywordType.Static;
case TokenLexicon.KnownFunctions.GLOBAL:
group.space = KeywordSpace.Global;
break;
default:
errors.Add(new SDLError

View File

@@ -141,8 +141,8 @@ internal static class TokenLexicon
public const string MESH_SHADER = "ms";
public const string PIXEL_SHADER = "ps";
public const string COMPUTE_SHADER = "cs";
public const string DYNAMIC = "dynamic";
public const string STATIC = "static";
public const string LOCAL = "local";
public const string GLOBAL = "global";
public const string FALLBACK = "fallback";
}
@@ -208,8 +208,8 @@ internal static class TokenLexicon
KnownFunctions.PIXEL_SHADER,
KnownFunctions.MESH_SHADER,
KnownFunctions.COMPUTE_SHADER,
KnownFunctions.DYNAMIC,
KnownFunctions.STATIC,
KnownFunctions.LOCAL,
KnownFunctions.GLOBAL,
};
private static readonly HashSet<string> s_types = new()