/*=============================================================================
	HitProxyVertexShader.hlsl: Vertex shader for rendering hit proxies.
	Copyright © 2006 Epic Games, Inc. All Rights Reserved.
=============================================================================*/

#include "Common.usf"
#include "Material.usf"
#include "VertexFactory.usf"

float4x4 ViewProjectionMatrix REGISTER(252);
float4 CameraPosition;

void Main(
	FVertexFactoryInput Input,
	out float4 Position : POSITION,
	out FVertexFactoryInterpolants FactoryInterpolants,
	out float4 ScreenPosition : TEXCOORD6,
	out float3 CameraVector : TEXCOORD7
	)
{
	float4	WorldPosition = VertexFactoryGetWorldPosition(Input,FactoryInterpolants);
	ScreenPosition = Position = MulMatrix(ViewProjectionMatrix,WorldPosition);
	CameraVector = VertexFactoryWorldToTangentSpace(Input,CameraPosition.xyz - WorldPosition.xyz * CameraPosition.w);
}
