add D3D11 project
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
cbuffer MatrixBuffer
|
||||
{
|
||||
matrix WorldViewProjectionMatrix;
|
||||
matrix WorldMatrix;
|
||||
//float4 TilingOffset;
|
||||
};
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 position : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float2 uv : TEXCOORD;
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 position : SV_POSITION;
|
||||
float3 positionWorld : POSITION1;
|
||||
float3 normal : NORMAL;
|
||||
float2 uv : TEXCOORD;
|
||||
};
|
||||
|
||||
VertexOutput main(VertexInput INPUT)
|
||||
{
|
||||
VertexOutput OUTPUT;
|
||||
|
||||
OUTPUT.position = mul(INPUT.position, WorldViewProjectionMatrix);
|
||||
OUTPUT.positionWorld = mul(INPUT.position, WorldMatrix);
|
||||
OUTPUT.normal = mul(INPUT.normal, (float3x3)WorldMatrix);
|
||||
OUTPUT.uv = INPUT.uv * float2(1.0f, 1.0f) + float2(0.0f, 0.0f); // uv * tiling + offset
|
||||
|
||||
return OUTPUT;
|
||||
}
|
||||
Reference in New Issue
Block a user