Skip to content

gridWireframe3D is missing some horizontal lines on odd subdivisions #522

@diwant

Description

@diwant

The issue I see is that the wireframe grid seems to be missing some horizontal lines when the y subdivisions are odd.

I am using an orthographic camera and a Flat3D shader. This is on an ubuntu 20.04 configuration with compiled 2020.06 Corrade, Magnum, and Magnum Plugins. Images exported using AnyImageConverter.

Some subdivision counts (such as 11 y subdivisions) are missing more than one horizontal line. I've tried exporting the image as tga and png but I get the same render.

Here are the grids I see for each of the subdivisions:
_mesh = Magnum::MeshTools::compile(Magnum::Primitives::grid3DWireframe({2, 2}));
2x2

_mesh = Magnum::MeshTools::compile(Magnum::Primitives::grid3DWireframe({2, 3}));
2x3

_mesh = Magnum::MeshTools::compile(Magnum::Primitives::grid3DWireframe({3, 2}));
3x2

_mesh = Magnum::MeshTools::compile(Magnum::Primitives::grid3DWireframe({3, 3}));
3x3

And here are a few square grids to show the difference between the odd and even values. Horizontal lines are the only ones missing and they are only missing for an odd number of y subdivisions.

_mesh = Magnum::MeshTools::compile(Magnum::Primitives::grid3DWireframe({4, 4}));
4x4

_mesh = Magnum::MeshTools::compile(Magnum::Primitives::grid3DWireframe({5, 5}));
5x5

_mesh = Magnum::MeshTools::compile(Magnum::Primitives::grid3DWireframe({9, 9}));
9x9

_mesh = Magnum::MeshTools::compile(Magnum::Primitives::grid3DWireframe({10, 10}));
10x10

_mesh = Magnum::MeshTools::compile(Magnum::Primitives::grid3DWireframe({11, 11}));
11x11

_mesh = Magnum::MeshTools::compile(Magnum::Primitives::grid3DWireframe({13, 13}));
13x13

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions