kvark / claymore

Just another tactical RPG in dark fantasy setting
Apache License 2.0
54 stars 3 forks source link

Detect vertex value bounds and pack the attributes adaptively #1

Closed kvark closed 9 years ago

kvark commented 9 years ago

Currently, we only check for index bounds. Texture coordinates are assumed to be in [0,1] range, and this is not always the case in practice. We could detect the range of not only the coordinates, but also vertex positions, and choose the proper representation:

In the future, we could also export an AABB of each attribute, allowing us to encode it in the (un)signed normalized format regardless of the range. This would require shaders to adapt though.