Files
Juliet/Assets/source/RootConstants.hlsl
T

43 lines
921 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 LightBufferIndex;
uint ActiveLightCount;
float GlobalAmbientIntensity;
float3 GlobalLightDirection; // Normalized, world-space
uint _Pad1;
float3 GlobalLightColor;
uint _Pad2;
float2 Scale; // 2D scale factor
float2 Translate; // 2D translation
float4 MeshAlbedo;
};
#endif // ROOT_CONSTANTS_HLSL