aboutsummaryrefslogtreecommitdiff
path: root/tools/ArtistTools/source/BlastPlugin/Shaders/common_buffers_ex.hlsl
blob: 0076599fb2d961b05361287d9888096cbf9094b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef COMMON_BUFFERS_HLSL
#define COMMON_BUFFERS_HLSL

cbuffer Camera : register(b0)
{
	row_major matrix viewProjection;
	row_major matrix projectionInv;
	float3 viewPos;
};

struct Light 
{
	int				m_enable;
	float3			m_dir;

	int				m_useShadows;
	float3			m_color;

	float3			m_ambientColor;
	int				m_isEnvLight;

	int				m_lhs;
	int				_reserved1;
	int				_reserved2;
	int				_reserved3;

	float			m_depthBias;
	float			m_depthGain;
	int				m_useEnvMap;
	float			m_intensity;

	row_major float4x4	m_viewMatrix;
	row_major float4x4	m_lightMatrix;
};

cbuffer World : register(b1)
{
	float3 ambientColor;
	float3 pointLightPos;
	float3 pointLightColor;
	float3 dirLightDir;
	float specularPower;
	float3 dirLightColor;
	float specularIntensity;
	Light g_Light[4];
};

cbuffer Object : register(b2)
{
	row_major matrix worldMatrix;
	float4 m_diffuseColor;
	float4 m_specularColor;
	float m_useDiffuseTexture;
	float m_useSpecularTexture;
	float m_useNormalTexture;
	float m_specularShininess;
	float selected;
};

#endif