forked from Misaki/GhostEngine
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
676 B
Plaintext
28 lines
676 B
Plaintext
shader "MyShader/Standard"
|
|
{
|
|
properties
|
|
{
|
|
float4 color = float4(1, 1, 1, 1);
|
|
tex2d texture1 = tex2d(black);
|
|
tex2d texture2 = tex2d(white);
|
|
tex2d texture3 = tex2d(grey);
|
|
tex2d texture4 = tex2d(normal);
|
|
sampler tex_sampler;
|
|
}
|
|
|
|
pass "Forward"
|
|
{
|
|
pipeline
|
|
{
|
|
ztest = disabled;
|
|
zwrite = off;
|
|
cull = off;
|
|
blend = opaque;
|
|
color_mask = all;
|
|
}
|
|
|
|
ms("F:/csharp/GhostEngine/Ghost.Graphics/RenderPasses/ShaderCode.hlsl", "MSMain");
|
|
ps("F:/csharp/GhostEngine/Ghost.Graphics/RenderPasses/ShaderCode.hlsl", "PSMain");
|
|
}
|
|
}
|