libobs: Use floating point textures when loading floating point image files #10605
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Allows the ability to open image files with floating point precision as floating point textures without unnecessarily downsampling to unsigned 8bit integer precision.
Motivation and Context
Someone told me that they were trying to load an image file with 32bit floating point precision per channel to do some sort of advanced shader stuff, and that important precision information was being lost. They didn't know why. I noticed that they were being converted away to 8bit unsigned integer RGBA unnecessarily despite the fact that we supported the texture format natively, so I just fixed it in like 5 minutes.
How Has This Been Tested?
Tested it with a .tiff file containing 32bit floating point precision RGBA file, opened it with an image source, checked the debugger to make sure the code path was being executed, checked the visible result, everything checked out.
Types of changes
Checklist: