// constants
float4x4 transform; // c0  View+Projection matrix
float4   lightpos;

struct Input
{ 
	float4 pos    : POSITION;
	float4 normal : NORMAL;
};

struct Output
{
	float4 pos      : POSITION;
};

Output main( Input src )
{
    Output dst;

	float4 light= src.pos - lightpos;
//	float dist= sqrt( dot(light,light) );
	float extrude= saturate( dot(light, -src.normal) );
	
	float4 pos= src.pos + normalize(light * extrude) * 20;
	
    dst.pos = mul(pos, transform);

    return dst;    
}
