Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable visualizing surface normals with "pointy" triangles (via a new DebugDraw primitive) #340

Merged
merged 5 commits into from
Jan 27, 2024

Commits on Jan 27, 2024

  1. Client: Add a visualization for debugging surface normals

    This makes it way easier to see when things have gone horribly wrong. It only generates a single triangle (pointed like an arrow of sorts) to minimize the amount of vertices generated; it would be possible to make an actual arrow, but honestly it isn't needed.
    rdw-software committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    7e910d2 View commit details
    Browse the repository at this point in the history
  2. Client: Add surface normals to generated debug boxes

    This is mostly so that visual testing becomes easier (can just use the existing cube3d demo scene).
    rdw-software committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    dbc795e View commit details
    Browse the repository at this point in the history
  3. Client: Add a normals visualization to the cube3d scene

    A flatly shaded unit cube is probably the simplest "interesting" shape to test the generated normals visualization with.
    rdw-software committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    d01b484 View commit details
    Browse the repository at this point in the history
  4. Client: Add a toggle for debugging terrain normals

    They are currently placeholders, but while implementing smooth shading for terrain surfaces this tool came in handy - might want to re-enable it later if some changes have to be made here.
    rdw-software committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    a1a79e5 View commit details
    Browse the repository at this point in the history
  5. Client: Increase the maximum GPU buffer size to 256 MB

    This is the default WebGPU limit, so it should be safe to use. The existing one is too small to render large maps with normal visualization enabled (such as schg_dun01 or nif_fild01) - there's just too many vertices since each vertex normal necessitates three more for the visualization itself.
    rdw-software committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    3b2d585 View commit details
    Browse the repository at this point in the history