uniform float4x4 WorldView;      // World transformation
uniform float4x4 WorldViewProj;  // World * View * Projection transformation

struct VS_OUTPUT
{
    float4 Position         : POSITION;   // vertex position
    float4 Depth            : TEXCOORD0;  // vertex depth
};

VS_OUTPUT VShaderEntry( in float3 Position : POSITION )
{
    VS_OUTPUT Output;
    
    float4 ViewPos = mul( float4( Position.x, Position.y, Position.z, 1.0f ), WorldView );
    
    Output.Position = mul( float4( Position.x, Position.y, Position.z, 1.0f ), WorldViewProj );
    Output.Depth = float4(-ViewPos.z * 0.1, 0.0, 0.0, 0.0);
    
    return Output;
}