GPUOpen-Effects / FidelityFX-CLI

FidelityFX CLI
MIT License
204 stars 21 forks source link

16bit support #4

Open Ocean47 opened 3 years ago

Ocean47 commented 3 years ago

I am trying to get a 16bit output, floating point or 16bit int out of the app but it doesn't seem to obey the -FP16 flag. I have tried sending through 16bit png, 16 bit int tif, and 32 floating point tifs with the flag -FP16 set but the output is always 8bit 3 channel formats no matter what I put the output format to me as well, ie png, or tif, etc.

Is there only specific options that work fully with the -FP16 flag? In order to have the out image be 16 floating point(half float) per channel?

Per the readme file and command line help docs:

-FP16 If not set (default), uses R8G8B8A8_UNORM GPU texture format. If set, uses R16G16B16A16_FLOAT GPU texture format.

adam-sawicki-a commented 3 years ago

Please note -FP16 parameter controls only the format of Direct3D texture used for internal processing. Support for certain features of image file formats is provided by Windows Imaging Component (WIC). This API claims to support DDS, which allows to store images in a variety of pixel formats, including 16 and 32 bits per component. However, we met some problems with it, so we removed DDS from the list of formats supported by the app. We will investigate this issue further.

Ocean47 commented 3 years ago

Ah thanks. That makes sense from what I have understood reading the code. I might be able to figure out a short-term solution for myself knowing that at least the most important part of the code is working correctly. This should mean I just need to figure out how to read in say tif or png higher bit level(16b, 16f, 32f, etc) formats and similar write out to that as well. But the hardest part should be working which is the processing of the buffers with the shaders.

Thank-you for the help! If I figure out anything will share it here in case it might help.

adam-sawicki-a commented 3 years ago

Thank you. When figuring out various pixel formats, please also pay attention whether WIC performs gamma correction or not.