deferred shading artifact border

Started by
1 comment, last by samoth 16 years, 2 months ago
How should I go about removing thoes borders around the objects as seen in the image? I have tried rendering with all type CLAMP, WARP, BORDER. If I am to render the objects in a forward renderer, these border don't appear. However once I switch to deferred rendering, there seems to be a border around all objects drawn. http://img156.imageshack.us/img156/774/imageez6.png I am using dx9.0c, and my g-buffer is in D3DFMT_A16B16G16R16F. Edit: After testing it seems that these borders go away if I sample my g-buffers with Point Texture Filter. However it makes the images looks very pixelated. When attempting to read the information from g-buffer, how should I filter/sample it? [Edited by - littlekid on February 13, 2008 8:24:20 AM]
Advertisement
Quote:Original post by littlekidEdit: After testing it seems that these borders go away if I sample my g-buffers with Point Texture Filter. However it makes the images looks very pixelated.
When attempting to read the information from g-buffer, how should I filter/sample it?


And why would you want to filter g-buffer contents? I always thought it should be sampled with point filtering enabled and that's what I do. Image doesn't look more pixelated than one produced by forward renderer (assuming that AA is disabled).

On the other hand - even with linear filtering enabled you shouldn't get such artifacts if only your g-buffer texcoords are set correctly (pixel / texel exactly)... Doublecheck it. Do you use quad or volume representation of your lights?
You should make sure that you read exactly one texel from your G-Buffer per pixel (might try offsetting by 0.5;0.5 so the sample is in the middle).
The aliasing you observe is "normal" for deferred shading.

Filtering the G-Buffer is problematic. Some of your G-Buffer channels may interpolate well (color), others interpolate worse or not at all (depth/position, or material index).

If the aliasing is disturbing, you can do a post-process to find edges and selectively blur these (using normals/depth differentials, described in a couple of papers).
Or, if you can afford the dramatic increase in fillrate and pixel shader, you can supersample. Usually that's memory and shader overkill, though.

This topic is closed to new replies.

Advertisement