Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 16-Bit HDR textures #3220

Merged
merged 3 commits into from
Aug 5, 2023
Merged

Support 16-Bit HDR textures #3220

merged 3 commits into from
Aug 5, 2023

Conversation

Not-Nik
Copy link
Contributor

@Not-Nik Not-Nik commented Aug 2, 2023

Makes creation of HDR textures with 16-Bit half floats possible. This needs some minor compatibility changes because in OpenGL ES half float textures are in a separate extension, but it won't change platform support in any major way (the two even have a single entry in Khronos' extension registry).

The image manipulation functions are a bit more complicated, because there is no native half float support in C so I've used two new util functions HalfToFloat and FloatToHalf there.

This doesn't change the API apart from 3 (6 if you count rlgl) new enum variants.

src/utils.c Outdated Show resolved Hide resolved
src/utils.c Outdated Show resolved Hide resolved
src/utils.c Outdated Show resolved Hide resolved
src/utils.c Outdated Show resolved Hide resolved
@raysan5
Copy link
Owner

raysan5 commented Aug 4, 2023

@Not-Nik Thanks for the improvement! Actually it was on the raylib future plans but it was discarded... I can reconsider it, it looks good. Just added a couple of review comments.

@Not-Nik
Copy link
Contributor Author

Not-Nik commented Aug 5, 2023

Just added a couple of review comments.

Updated accordingly

@raysan5 raysan5 merged commit dc621ca into raysan5:master Aug 5, 2023
12 checks passed
@raysan5
Copy link
Owner

raysan5 commented Aug 5, 2023

@Not-Nik Thank you very much! This is a really nice addition! 😄

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

Successfully merging this pull request may close these issues.

2 participants