ultimate-research / ssbh_lib

Reading and writing SSBH file formats in Rust
MIT License
8 stars 3 forks source link

test u8 mesh attribute conversion using in game values #137

Closed ScanMountGoat closed 1 year ago

ScanMountGoat commented 2 years ago

It's important that key output values like 1.0 and 0.5 map to the correct byte values from the vertex buffer. These test cases can be generated using Ryujinx and Renderdoc. The test cases should test that VersionedVectorData is initialized correctly from VectorData and methods like VectorDataV8::from_positions work as expected.

ScanMountGoat commented 2 years ago

From the vulkan spec, unsigned normalized 8-bit integers are converted to float using the format c / (2^8 - 1). https://registry.khronos.org/vulkan/specs/1.3/html/chap3.html#fundamentals-fixedfpconv