float4x4 worldViewProj : WorldViewProjection;
float4 ambient : AMBIENT;

struct vertexInput
{
    float4 position				: POSITION;
};

struct vertexOutput
{
    float4 hPosition		: POSITION;
};

vertexOutput VS_Pos(vertexInput IN)
{
    vertexOutput OUT;
    OUT.hPosition = mul(IN.position, worldViewProj);
    
    return OUT;
}

float4 PS_Ambient( vertexOutput IN) : COLOR
{
    return ambient;
}

//-----------------------------------
technique Lines
{
    pass p0 
    {		
		VertexShader = compile vs_1_1 VS_Pos();
		PixelShader  = compile ps_1_1 PS_Ambient();
    }
}

technique Solid
{
    pass p0
    {		
		VertexShader = compile vs_1_1 VS_Pos();
		PixelShader  = compile ps_1_1 PS_Ambient();
		ColorWriteEnable = 0;
		cullmode = none;
    }
    pass p1
    {		
		VertexShader = compile vs_1_1 VS_Pos();
		PixelShader  = compile ps_1_1 PS_Ambient();
		cullmode = none;
		ColorWriteEnable = Red | Green | Blue | Alpha;
		alphablendenable = true;
		srcblend = srcalpha;
		destblend = invsrcalpha;
    }
    pass RestoreState
    {
        alphablendenable = false;
        cullmode = ccw;
    }
}
