-
Notifications
You must be signed in to change notification settings - Fork 0
/
G-Buffer.fx
57 lines (47 loc) · 1.47 KB
/
G-Buffer.fx
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
//--------------------------------------------------------------------------------------
// File: G-Buffer.fx
//--------------------------------------------------------------------------------------
cbuffer ConstantBuffer : register(b0)
{
matrix World;
matrix View;
matrix Projection;
float3 EyePosW;
float HeightMapScale;
}
//--------------------------------------------------------------------------------------
struct VS_INPUT
{
float4 PosL : POSITION;
float3 NormL : NORMAL;
float3 TangentL : TANGENT;
float2 Tex : TEXCOORD0;
};
//--------------------------------------------------------------------------------------
struct VS_OUTPUT
{
float4 PosH : SV_POSITION;
float4 PosV : POSITION0;
float3 NormW : NORMAL0;
float3 NormV : NORMAL1;
float3 PosW : POSITION1;
float3 LightVecT : POSITION2;
float3 EyeVecT : POSITION3;
float2 Tex : TEXCOORD0;
float4 ShadowPosH : TEXCOORD1;
};
//--------------------------------------------------------------------------------------
struct PS_OUTPUT
{
float4 LightAccumulation : SV_Target0;
float4 Diffuse : SV_Target1;
float4 Specular : SV_Target2;
float4 NormalDepth : SV_Target3;
};
//--------------------------------------------------------------------------------------
// Normal Map Vertex Shader
//--------------------------------------------------------------------------------------
VS_OUTPUT NormalVS(VS_INPUT input)
{
VS_OUTPUT output = (VS_OUTPUT) 0;
}