Major refactor of shader compiler and related systems:
- Switch ShaderDescriptor/PassDescriptor to arrays; remove IPassDescriptor
- Rewrite keywords block parser/semantic analysis for flexible syntax
- Change property initializers to brace syntax `{ ... }`
- Simplify TokenStream API (remove ref index params)
- Make GetBindlessIndex return uint (~0u for not found)
- Update shader compilation and variant logic for new descriptors
- Update test shader syntax to match new property/keyword formats
- Add AGENTS.md agent development guide
- Add Antlr4 dependency to Ghost.DSL
- Miscellaneous code style and error handling improvements
42 lines
898 B
Plaintext
42 lines
898 B
Plaintext
shader "MyShader/Standard"
|
|
{
|
|
properties
|
|
{
|
|
float4 color = { 1, 1, 1, 1 };
|
|
tex2d texture1 = { black };
|
|
tex2d texture2 = { white };
|
|
tex2d texture3 = { grey };
|
|
tex2d texture4 = { normal };
|
|
sampler tex_sampler;
|
|
}
|
|
|
|
pass "Forward"
|
|
{
|
|
pipeline
|
|
{
|
|
ztest = disabled;
|
|
zwrite = off;
|
|
cull = off;
|
|
blend = opaque;
|
|
color_mask = all;
|
|
}
|
|
|
|
keywords
|
|
{
|
|
local TEST_KEYWORD, TEST_KEYWORD2;
|
|
local TEST_KEYWORD3;
|
|
}
|
|
|
|
hlsl
|
|
{
|
|
float Test()
|
|
{
|
|
return 1.0;
|
|
}
|
|
}
|
|
|
|
mesh "F:/csharp/GhostEngine/Ghost.Graphics/RenderPasses/ShaderCode.hlsl" : "MSMain";
|
|
pixel "F:/csharp/GhostEngine/Ghost.Graphics/RenderPasses/ShaderCode.hlsl" : "PSMain";
|
|
}
|
|
}
|