Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

toFloat3SE produces mantissa of 0 for non zero values #268

Open
Zvork opened this issue Sep 13, 2017 · 2 comments
Open

toFloat3SE produces mantissa of 0 for non zero values #268

Zvork opened this issue Sep 13, 2017 · 2 comments

Comments

@Zvork
Copy link

Zvork commented Sep 13, 2017

Inputing float values of 0.388235301 in x/y/z produces the correct shared exponant of 14 but a mantissa of 0,0,0 which unpacks to value 0.f
Compared this with results comming from the glm library packing functions.

@castano
Copy link
Owner

castano commented Sep 13, 2017

Hmm... I just copied the code from the OpenGL spec, but I see in the revision comments that there were significant errors in that code. Would you mind updating the code in NVTT to match the spec? I won't have much time until next week.

https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_shared_exponent.txt

@Zvork
Copy link
Author

Zvork commented Sep 14, 2017

Sure. We can also use the functions in the GLM library, if you're ok for including it in the externs. It's a header only library. See https://github.com/g-truc/glm
That would solve the R11G11B10 issue also in one sweep (yes the R11G11B10 code seems faulty too).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants