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.
28 lines
713 B
C#
28 lines
713 B
C#
using Ghost.Core;
|
|
using Ghost.Graphics.Contracts;
|
|
|
|
namespace Ghost.Graphics.RHI;
|
|
|
|
public interface IShaderPipeline
|
|
{
|
|
/// <summary>
|
|
/// Pipeline space
|
|
/// </summary>
|
|
PipelineType Type
|
|
{
|
|
get;
|
|
}
|
|
}
|
|
|
|
public interface IPipelineLibrary : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// Load pipeline library from disk.
|
|
/// </summary>
|
|
/// <param name="filePath">File path. If null, load default library.</param>
|
|
void InitializeLibrary(string? filePath);
|
|
void SaveLibraryToDisk(string filePath);
|
|
bool HasPipeline(GraphicsPipelineKey key);
|
|
Result<GraphicsPipelineKey> CompilePSO(ref readonly GraphicsPSODescriptor descriptor, ref readonly GraphicsCompiledResult compiled);
|
|
}
|