I am trying to re-texture an image on top of a series of images using HLSL and a UV render pass, but the resulting images have a number of artifacts (Overall pixelated image, aliasing artifacts within the image).
The background and the UV-pass can be found in an album here
resulting image:
I am guessing that the issue is with the MIP levels and that I somehow have to calculate them for each frame, and my question is simply how would one go about doing that, can this be done in the pixelshader?
Here is a quick rundown of what I am doing:
float4 UVPass = UVSRV.Sample(SamplerWrap, input.Tex);
float4 Background = backgroundSRV.Sample(SamplerWrap, input.Tex);
float4 Composit = compositImageSRV.Sample(SamplerWrap, saturate(UVPass));
Then using the alpha of the UVPass as a mask, I decide if I should return Composit or the Background.
My sampler uses D3D11_FILTER_MIN_MAG_MIP_LINEAR.