Skip to content

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

53 stars

Watchers

4 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages