Hi I have a visual artefact in my scene that I don't quite understand. Some background information:
In the pre-render I write to 3 buffers:
then in the render I render a quad and read the those values and calculate lighting and fog (based on distance from camera to fragment).
also to detect the 'sky' I now check for zero-length normals. Further, I made the fog color the same as the sky color.
Now the following artefact shows on the edges of the hills of my terrain:
(click on the image to see the larger version. You can see in the middle that there is a hard line where the edge of the hill ends and the sky begins. In the 'non-deffered' rendering method I did not see this artefact.)
It kinda seems like on the edge you see no fog, or it is fog combined with a black color... in other words: I'm not sure what is happening there, so I also don't know how to fix it.
Anyone has an idea what it could be? Or maybe even know a way to fix it?