Danbias/Code/OysterGraphics/Shader/HLSL/SimpleDebug/DebugCameraVertex.hlsl

28 lines
521 B
HLSL
Raw Normal View History

cbuffer PerFrame : register(b0)
{
matrix View;
float4x4 Projection;
}
cbuffer PerModel : register(b1)
{
matrix World;
}
2013-11-21 13:50:43 +01:00
struct VertexIn
{
float3 pos : POSITION;
float2 UV : TEXCOORD;
float3 normal : NORMAL;
};
2013-11-21 13:50:43 +01:00
float4 main( VertexIn input ) : SV_POSITION
{
2013-11-21 23:54:12 +01:00
float4 postTransform = float4(input.pos*0.1f,1);
postTransform.y += 1.5f;
//return postTransform;
2013-11-22 10:55:21 +01:00
//return mul(View, float4(input.pos,1));
matrix VP = mul(Projection, View);
2013-11-21 23:54:12 +01:00
//matrix WVP = mul(World, VP);
2013-11-22 10:55:21 +01:00
return mul(VP, float4(input.pos*0.1f,1) );
}