Files
GhostEngine/Ghost.DSL/BuiltIn/Properties.hlsl
Misaki 6a041f75ba Refactor: variant-aware shader/material pipeline overhaul
Major architectural update to graphics/material/shader system:
- Introduced strongly-typed key structs (Key64/Key128) for passes, variants, and pipelines; removed legacy key types.
- Implemented robust hashing and key generation utilities for efficient variant and pipeline lookup/caching.
- Shader compiler now compiles/caches all keyword variants using new key system; includes handled as lists.
- Switched to push constant root signature for per-draw data; updated HLSL and C# codegen accordingly.
- Refactored Material, Shader, and Pass data structures for cache efficiency and variant support.
- Pipeline library and PSO management now use 128-bit keys and variant-specific caching.
- Replaced WorldNode with SceneNode in editor/scene graph; introduced ComponentManager for archetype/query management.
- Migrated math utilities to Misaki.HighPerformance.Mathematics; updated editor controls.
- Updated all HLSL and codegen for new buffer/push constant layouts and macros.
- Misc: project reference cleanup, D3D12 Work Graph support, doc updates, and code modernization.
2026-01-09 22:25:37 +09:00

37 lines
812 B
HLSL

#ifndef BUILTIN_PROPERTIES_HLSL
#define BUILTIN_PROPERTIES_HLSL
#include "F:/csharp/GhostEngine/Ghost.DSL/BuiltIn/Common.hlsl"
struct PushConstantData
{
BYTE_ADDRESS_BUFFER globalBuffer;
BYTE_ADDRESS_BUFFER perViewBuffer;
BYTE_ADDRESS_BUFFER perObjectBuffer;
BYTE_ADDRESS_BUFFER perMaterialBuffer;
};
struct PerViewData
{
float4x4 viewMatrix;
float4x4 projectionMatrix;
float3 cameraPosition;
float nearClip;
float3 cameraDirection;
float farClip;
float4 screenSize; // xy: size, zw: 1/size
};
struct PerObjectData
{
float4x4 localToWorld;
float3 worldBoundsMin;
BYTE_ADDRESS_BUFFER vertexBuffer;
float3 worldBoundsMax;
BYTE_ADDRESS_BUFFER indexBuffer;
};
PushConstantData g_PushConstantData : register(b0);
#endif // BUILTIN_PROPERTIES_HLSL