Files
cool-source-archive/materialsystem/stdshadersdx11/common_cbuffers_fxc.h
Totterynine 2773eae4d7 shaderapidx11
use -dxlevel 110 to use it
2021-09-22 18:56:56 +05:00

50 lines
982 B
C

#ifndef COMMON_CBUFFERS_H_
#define COMMON_CBUFFERS_H_
#include "shader_register_map.h"
#include "lightinfo_fxc.h"
#define CBUFFER_PERMODEL( reg ) \
cbuffer PerModel_t : reg \
{ \
float4x4 cModelMatrix; \
LightInfo cLightInfo[MAX_NUM_LIGHTS]; \
int4 cLightCount; \
float3 cAmbientCube[6]; \
};
#define CBUFFER_SKINNING( reg )\
cbuffer Skinning_t : reg \
{ \
float4x3 cModel[53]; \
};
#define CBUFFER_FLEX( reg )\
cbuffer Flex_t : reg \
{ \
float4 cFlexWeights[512]; \
};
#define CBUFFER_PERFRAME( reg ) \
cbuffer PerFrame_t : reg \
{ \
float4x4 cViewMatrix; \
float4 cEyePos; \
float4 cToneMappingScale; \
float4 cFlashlightPos; \
};
#define CBUFFER_PERSCENE( reg ) \
cbuffer PerScene_t : reg \
{ \
float4x4 cProjMatrix; \
float4x4 cFlashlightWorldToTexture; \
float4 cFlashlightScreenScale; \
float4 cFlashlightColor; \
float4 cFlashlightAttenuationFactors; \
float4 cShadowTweaks; \
float4 cConstants; \
float4 cFlexScale; \
};
#endif // COMMON_CBUFFERS_H_