feat(shader): refactor and enhance shader compilation

Refactored shader compilation and resource management systems:
- Introduced `DXCShaderCompiler` for HLSL compilation and reflection.
- Added `BuildFinalShaderCode` method for robust shader code generation.
- Replaced raw strings with `ShaderEntryPoint` struct for shader paths.
- Updated `RenderContext` and `RenderGraphContext` for new pipeline methods.
- Added thread-safe resource management methods in `ResourceManager`.
- Introduced `DXCShaderReflectionData` for shader reflection handling.
- Removed redundant code and simplified `ShaderPropertiesRegistry`.

BREAKING CHANGE: Updated shader and resource APIs to use new structures and methods.
This commit is contained in:
2026-04-11 00:45:46 +09:00
parent 4ed5572ce7
commit f9a6e9cbbe
131 changed files with 13135 additions and 1002 deletions

View File

@@ -3,6 +3,12 @@
#include "F:/csharp/GhostEngine/src/Runtime/Ghost.Graphics/Shaders/Includes/Common.hlsl"
#define GLOBAL_BINDLESS_SIG \
"RootFlags(ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT | " \
"CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | " \
"SAMPLER_HEAP_DIRECTLY_INDEXED), " \
"RootConstants(num32BitConstants=3, b0, space=0)"
// TODO: This should be auto generated to match the c# side.
struct GraphicsPushConstantData
@@ -59,6 +65,9 @@ struct MeshData
GraphicsPushConstantData g_PushConstantData : register(b0);
#elif defined(__COMPUTE__)
ComputePushConstantData g_PushConstantData : register(b0);
#elif defined(__WORK_GRAPH__)
#define WorkGraphPushConstantData ComputePushConstantData
WorkGraphPushConstantData g_PushConstantData : register(b0);
#endif
#endif // GHOST_PROPERTIES_HLSL