float4x4 worldViewProj : Transform;

struct vertexInputUnboned
{
    float4 position				: POSITION;
    float4 fColor                : COLOR0;
};

struct vertexOutput {
    float4 hPosition			: POSITION;
    float4 fColor                : COLOR0;
};

vertexOutput VS_Shared(vertexInputUnboned IN)
{
    vertexOutput OUT;
    OUT.hPosition = mul(IN.position, worldViewProj);
    OUT.fColor = IN.fColor;
    return OUT;
}

float4 PS_Color( vertexOutput IN): COLOR
{  
    return IN.fColor;
}

#ifdef FixedPipe
technique plainfill
{
    pass p0
    {
		VertexShader = compile vs_1_1 VS_Shared();
		PixelShader  = 0;

		ColorOp[0] = SelectArg1; ColorArg1[0] = Diffuse;
		AlphaOp[0] = SelectArg1; AlphaArg1[0] = Diffuse;
		
		ColorOp[1] = Disable;
		AlphaOp[1] = Disable;
    }
}
#else
technique plainfill
{
    pass p0
    {
		VertexShader = compile vs_1_1 VS_Shared();
		PixelShader  = compile ps_1_1 PS_Color();
    }
}
#endif
