forked from Misaki/GhostEngine
Updated target frameworks to .NET 10.0 across multiple projects for compatibility with the latest features. Refactored namespaces and introduced new classes for shader descriptors, FMOD integration, and DirectX 12 utilities using TerraFX. Replaced `Win32` bindings with TerraFX equivalents for DirectX 12. Added a C# wrapper for FMOD Studio API, including DSP and error handling. Enhanced entity queries, component storage, and query filters for better performance and type safety. Introduced new test projects and updated the solution structure. Added `meshoptimizer` bindings and integrated `meshoptimizer_native.dll`. Improved code readability, maintainability, and performance.
50 lines
1.3 KiB
HLSL
50 lines
1.3 KiB
HLSL
#ifndef PROPERTIES_HLSL
|
|
#define PROPERTIES_HLSL
|
|
|
|
#include "F:/csharp/GhostEngine/Ghost.Shader/BuiltIn/Common.hlsl"
|
|
|
|
struct PerViewData
|
|
{
|
|
float4x4 cameraMatrix;
|
|
float4 screenSize; // xy = size, zw = 1/size
|
|
};
|
|
|
|
struct PerObjectData
|
|
{
|
|
float4x4 localToWorld;
|
|
float3 worldBoundsMin;
|
|
BYTE_ADDRESS_BUFFER_BINDLESS vertexBuffer;
|
|
float3 worldBoundsMax;
|
|
BYTE_ADDRESS_BUFFER_BINDLESS indexBuffer;
|
|
};
|
|
|
|
cbuffer GlobalConstants : register(b0)
|
|
{
|
|
GlobalData g_GlobalData;
|
|
};
|
|
|
|
cbuffer PerViewConstants : register(b1)
|
|
{
|
|
PerViewData g_PerViewData;
|
|
};
|
|
|
|
cbuffer PerObjectConstants : register(b2)
|
|
{
|
|
PerObjectData g_PerObjectData;
|
|
};
|
|
|
|
cbuffer PerMaterialConstants : register(b3)
|
|
{
|
|
PerMaterialData g_PerMaterialData;
|
|
};
|
|
|
|
#if defined(USE_TRADITIONAL_BINDLESS)
|
|
Texture2D GlobalTexture2DHeap[GLOBAL_TEXTURE2D_HEAP_SIZE] : register(t0);
|
|
Texture3D GlobalTexture3DHeap[GLOBAL_TEXTURE3D_HEAP_SIZE] : register(t0);
|
|
TextureCube GlobalTextureCubeHeap[GLOBAL_TEXTURECUBE_HEAP_SIZE] : register(t0);
|
|
Texture2DArray GlobalTexture2DArrayHeap[GLOBAL_TEXTURE2D_ARRAY_HEAP_SIZE] : register(t0);
|
|
TextureCubeArray GlobalTextureCubeArrayHeap[GLOBAL_TEXTURECUBE_ARRAY_HEAP_SIZE] : register(t0);
|
|
SamplerState GlobalSamplerHeap[GLOBAL_SAMPLER_HEAP_SIZE] : register(s0);
|
|
#endif
|
|
|
|
#endif |