Procedural geometry depth and render order

Hi,
I am creating tile map and want my tiles to have edges, so i create two primitives, one for triangles and other for lines. However, unless I manually offset edges/lines towards the camera, edges are not rendered. I would like to avoid manual offset, is there any way to achieve this with depth buffer and binning?

1 Like

It’s probably the depth testing. Some ways to do it:

  1. Apply a depth offset (DepthOffsetAttrib) to the lines to make them offset in the depth buffer.
  2. Set the depth testing mode (using DepthTestAttrib) to RenderAttrib.MLessEqual so that fragments with the same depth value do get rendered.