Could you dump the surfaces of the g buffer ? At such a small scale, i doubt there is float issues except if you are doing something really bad.
Dump the surface? I dont understand.
Could you dump the surfaces of the g buffer ? At such a small scale, i doubt there is float issues except if you are doing something really bad.
Dump the surface? I dont understand.
You need to copy the render targets to a lockable surface ( create in the symem pool ) with UpdateTexture/UpdateSurface or GetRenderTargetData. Then call LockRect on it to read the data on CPU to write them in an image file ( TGA or DDS are simple format to create )
Another way to dump the surfaces is to perform a single frame capture in PIX, find the render target you're after, then right click and save it as DDS.
The problem seem to be in the lightshader..
If i only draw the gbuffer surface there is no problem.
But as soon as i apply the light the blackline is there.
...
if( position.w == 0 )
return float4(1,0,0,1);//red for debugging
position /= position.w;
...
Seem means i am not sure, so you can use a frame debugger ( pix, gpuperfstudio or nsight ) and debug the pixel shader on a black pixel by yourself, or give us more information because without more, it is a bit of a dead end.
The black line is right at the edge of the mesh, where the two meshes would intersect if they where to overlap.
The line flickers and become less and more visible if i move the camera around.
Im not using msaa.
Add random checks to check for non-wanted values and then replace them with something else, so when you find a spot where this fixes the error, you can start moving the check to find out where it happens.
Thanks for all your tips and feedback.
I think i have narrowed down the problem.
In my screenquad shader, if i only draw the normals from the gbuffer i get the black line.
So somehow when i draw the normals to the gbuffer, something goes wrong on a few pixels.
How do you calculate the normals? In the modeling program, manually or using some d3dx-function?