Hi,
Not sure if this counts as a beginner question or not. I apologise if it's in the wrong section.
I'm currently playing around with some deferred rendering. It seems to be working ok. I have directional and point lighting. I'm rendering the lights in to a render target and then using that to calculate the final stuff. But I think my projective co-ords are slightly off. If you look at the image below you'll see that at the geometry edge there's a white line. As though the lighting texture doesn't quite match up.
The code I am using to build the projective co-ordinates is as follows:
//suv are the co-ords for tex2Dproj()
//invWidth is (0.5f / screen_width)
//invHeight is (0.5f / screen_height)
v2fout.p = mul(a2vin.p, wvp);
v2fout.uv = a2vin.uv;
v2fout.suv = v2fout.p;
v2fout.suv.xy = float2(v2fout.suv.x * 0.5, -v2fout.suv.y * 0.5);
v2fout.suv.xy += (0.5 * v2fout.suv.w);
v2fout.suv.x += 0.5f * invWidth * v2fout.suv.w;
v2fout.suv.y += 0.5f * invHeight * v2fout.suv.w;
Thanks for any help/advice.