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

Conversation

rdw-software
Copy link
Member

Resolves #334.

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.
This is mostly so that visual testing becomes easier (can just use the existing cube3d demo scene).
A flatly shaded unit cube is probably the simplest "interesting" shape to test the generated normals visualization with.
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.
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 rdw-software merged commit dff72db into main Jan 27, 2024
8 checks passed
@rdw-software rdw-software deleted the 334-normals-debug-visualization branch January 28, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a way to visualize normal vectors for the ground mesh's terrain geometry
1 participant