3
\$\begingroup\$

I'm starting a little BSP engine, and have begun implementing Brush CSG. Currently I represent my brushes as the enclosed volume of surface planes (like old idTech 3 maps), with a cache for each face that is generated on rendering the brush for the first time.

Now, I subtract a cube from another cube to cut a hole into it, yielding 5 brushes. Instantly, t-junctions! As you can see below, visible cracks appear:

Oh no, misaligned polygons!

This isn't particularly surprising, and obviously moving onto the BSP compilation process I will have to fix up all the t-junctions in the scene. However, I notice that in e.g. GtkRadiant, if I perform the same operation, these artifacts don't show up (or at least, I don't notice them), despite the fact the new brushes ARE separate and can even be moved apart and back together in the scene.

How do I remove this rendering issue at map design time?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

The issue I experienced was NOT standard OpenGL behaviour.

I had accidentally enabled GL_POLYGON_OFFSET_FILL in my code, which apparently causes the polygon fragments to not line up.

Disabling POLYGON_OFFSET_FILL fixed the problem.

\$\endgroup\$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .