Correct VertexShader
This commit is contained in:
parent
469ccaab6c
commit
07a616b252
|
@ -1,28 +1,13 @@
|
||||||
#include "Debug.hlsl"
|
#include "Debug.hlsl"
|
||||||
{
|
|
||||||
matrix View;
|
|
||||||
float4x4 Projection;
|
|
||||||
}
|
|
||||||
cbuffer PerModel : register(b1)
|
|
||||||
{
|
|
||||||
matrix World;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct VertexIn
|
VertexOut main( VertexIn input )
|
||||||
{
|
{
|
||||||
float3 pos : POSITION;
|
VertexOut outp;
|
||||||
float2 UV : TEXCOORD;
|
outp.Wpos = mul( World, float4(input.pos,1) );
|
||||||
float3 normal : NORMAL;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 main( VertexIn input ) : SV_POSITION
|
|
||||||
{
|
|
||||||
float4 postTransform = mul( World, float4(input.pos,1) );
|
|
||||||
//float4 postTransform = float4(input.pos,1);
|
|
||||||
//return postTransform;
|
|
||||||
//return mul(View, float4(input.pos,1));
|
|
||||||
matrix VP = mul(Projection, View);
|
matrix VP = mul(Projection, View);
|
||||||
//matrix WVP = mul(World, VP);
|
outp.Pos = mul(VP, outp.Wpos );
|
||||||
return mul(VP, postTransform );
|
outp.UV = input.UV;
|
||||||
|
outp.Normal = input.normal;
|
||||||
|
|
||||||
|
return outp;
|
||||||
}
|
}
|
Loading…
Reference in New Issue