Skip to content

Encoding float3 normal vectors to uint16 by using optimized sperical coords together with alias method.

License

Notifications You must be signed in to change notification settings

atyuwen/normal_encoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Normal Vector Encoder/Decoder


  • Encoding float3 normal vectors to uint16 by using optimized spherical coords together with alias method, with a bounded error less than 0.562432 degree.

  • Both encoding and decoding are very fast. Encoding do use a search process to map jagged array entry to a linearized index, but the searching is short and cache friendly. (5 steps at most, <2 steps in average). Decoding don't do any searching at all.

  • Encoder need a 3172-bytes look up table, while decoder only needs 1362 bytes. (can be further reduced to 1/2 if exploit symmetries)

  • The code is not carefully optimized.


About

Encoding float3 normal vectors to uint16 by using optimized sperical coords together with alias method.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages