41 lines
967 B
HLSL
41 lines
967 B
HLSL
#ifndef ROOT_CONSTANTS_HLSL
|
|
#define ROOT_CONSTANTS_HLSL
|
|
|
|
struct PointLight
|
|
{
|
|
float3 Position;
|
|
float Radius;
|
|
float3 Color;
|
|
float Intensity;
|
|
};
|
|
|
|
struct TransformData
|
|
{
|
|
row_major float4x4 Model;
|
|
};
|
|
|
|
cbuffer RootConstants : register(b0, space0)
|
|
{
|
|
row_major float4x4 ViewProjection;
|
|
uint MeshIndex;
|
|
uint TransformsBufferIndex;
|
|
uint BufferIndex;
|
|
uint TextureIndex;
|
|
uint VertexOffset; // Base vertex for indexed drawing with bindless buffers
|
|
uint _Padding; // Padding for alignment
|
|
float2 Scale; // 2D scale factor
|
|
float2 Translate; // 2D translation
|
|
float2 _Padding2; // Explicit padding to align LightDirection to 16 bytes
|
|
|
|
float3 LightDirection; // Normalized, world-space
|
|
float LightPad;
|
|
float3 LightColor;
|
|
float AmbientIntensity;
|
|
|
|
uint LightBufferIndex;
|
|
uint ActiveLightCount;
|
|
};
|
|
|
|
|
|
#endif // ROOT_CONSTANTS_HLSL
|