Home Artists Posts Import Register

Content

Earlier on, I had already investigated the framebuffer memory pointers and saw that the glitchy interlacing bug is not in them.

Now, to debug the BSP renderer, I've forced the framebuffer to be fully gray prior to every frame in order to eliminate the ghosting and make it easier to track the problematic polygons.

This shows that the bug only happens in some of the BSP polygons that are partially occluded by other BSP polygons. See how the glitch on surfaces occluded by BSP entities vanishes when r_drawentities is set to zero.

These results narrows the source of the glitch down to the screenspace edge clipping subsystem, which is a subsystem that optimizes depth culling without using a z buffer. My guess is that while the vertical position of the spans (which is used by the interlacing algorithm) is still correct, the horizontal position may be wrapping around the screen coordinates, which would offset the rendering vertically.

I don't fully understand this subsystem yet, but I'm going to study it now and tackle this bug until it's solved.

Files

Comments

No comments found for this post.