http://cl.ly/2G0X1G36232L110l2H0l
As you can see every mesh I render has this (in this case white) border around it.
This border is color leaking from the lightmap (I've confirmed that it is exactly the color of the lightmap at that pixel position).
Now if I only output the Albedo or the Lighting itself there's nothing wrong. Only when combining both of them in the compose shader I get this leaking issue. Please tell me if I'm doing something wrong with the half-pixel offset correction.
Here's how I correct it in the VS on both the lighting and compose shader:
// Pass UV (pay attention to half pixel offset)
output.UV = input.UV - (0.5f / GBufferTextureSize);
GBufferTextureSize is a float2(screenWidth, screenHeight)
I've also tried (1.0f / GBufferTextureSize), like my tutorial wrote, which gives me even thicker borders.
Sampling albedo as point clamp also does not change anything.
MSAA is also turned off.
Update: I think outputting transparent black around the objects in the lighting shader seems to fix this...still experimenting....
Update2: Ok so if the object has nothing behind it having a different shading than the one in front it works but as soon as there's shaded pixels behind it the light leaks through again so it must be something else...