-
Notifications
You must be signed in to change notification settings - Fork 0
/
statue_vs.hlsl
43 lines (37 loc) · 861 Bytes
/
statue_vs.hlsl
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
cbuffer ConstantBuffer : register(b0)
{
matrix world;
matrix view;
matrix projection;
float3 lightDirection;
float3 cameraPosition;
}
struct VsInput
{
float4 position : POSITION;
float3 normal : NORMAL;
float3 tangent : TANGENT;
float3 bitangent : BITANGENT;
float2 uv : TEXCOORD;
};
struct VsOutput
{
float4 position : SV_Position;
float4 worldPosition : POSITION;
float3 normal : NORMAL;
float3 tangent : TANGENT;
float3 bitangent : BITANGENT;
float2 uv : TEXCOORD;
};
VsOutput main(const VsInput input)
{
VsOutput output = (VsOutput)0;
output.worldPosition = mul(input.position, world);
output.position = mul(output.worldPosition, view);
output.position = mul(output.position, projection);
output.normal = input.normal;
output.tangent = input.tangent;
output.bitangent = input.bitangent;
output.uv = input.uv;
return output;
}