Skip to content

Add tangent angle encoding to mesh compression#24616

Open
beicause wants to merge 7 commits into
bevyengine:mainfrom
beicause:mesh-compression-tangent-angle
Open

Add tangent angle encoding to mesh compression#24616
beicause wants to merge 7 commits into
bevyengine:mainfrom
beicause:mesh-compression-tangent-angle

Conversation

@beicause

@beicause beicause commented Jun 13, 2026

Copy link
Copy Markdown
Member

Objective

Depends on #24572. Perhaps a better alternative to #24535

Solution

Add methods to encode tangent to a snorm16 angle in position.w. Unlike #24535, this only requires both position and tangent to be compressed. Normal precision is unaffected. And in the unit test, this appears to have higher precision than #24535.

The method is mentioned in https://zeux.io/2026/04/30/quantizing-tangent-frames/ and https://www.jeremyong.com/graphics/2023/01/09/tangent-spaces-and-diamond-encoding/

Testing

scene_viewer with --mesh-compression, though testing parallax_mapping (or deferred_rendering) makes it more obvious whether the tangent calculation is correct.

@beicause beicause added A-Rendering Drawing game state to the screen X-Contentious There are nontrivial implications that should be thought through S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 13, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Jun 13, 2026
@beicause beicause added the C-Performance A change motivated by improving speed, memory usage or compile times label Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times S-Needs-Review Needs reviewer attention (from anyone!) to move forward X-Contentious There are nontrivial implications that should be thought through

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

1 participant