Projection Painting


So I wanted to do two things-

1> unwrap a mesh so can save textures for it

Out.Pos = mul((TexCd-.5), tWVP);
	Out.Pos.y *= -1.0f;

in the vertex shader seems to work ok for this.

2> project a texture on it. I wanted to do this by using a first render pass using the same geometry textured with the tex coordinates.

float4 uvCol = tex2D(uvSamp, In.TexCd);
	float4 col = tex2D(Samp, uvCol) * cAmb;

seems to be wrong.

can someone point me in the right direction? or perhaps suggest a better way to go about this? (56.5 kB)