Timeline for How to pack two 32bit floats into the alpha channel of a R16G16B16A16_FLOAT texture?
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 21, 2024 at 18:03 | comment | added | pmw1234 | It is doable, but you basically have to hand write a conversion function. flt32 to uint (hlsl has a function for this) then a hand written 32 bit float representation to a 16 bit float representation then finally extract the values. You might also consider going to a 2 channel 32 bit format. Under unity I think it is called RGfloat or RGint. That would give relatively easy access to all 5 values. | |
| Oct 21, 2024 at 17:22 | comment | added | Max | The API is actually the Unreal Engine 5 RHI, so it will vary between DX12, DX11 and the various gen9 console APIs. Unfortunately I can't change the texture format here, it really has to be a R16G16B16A16_FLOAT | |
| Oct 21, 2024 at 14:20 | history | edited | pmw1234 | CC BY-SA 4.0 | fixed yet another typo |
| Oct 21, 2024 at 13:26 | history | edited | pmw1234 | CC BY-SA 4.0 | fixed hlsl spelling |
| Oct 21, 2024 at 12:13 | history | edited | pmw1234 | CC BY-SA 4.0 | Add more info on why this method is recommended. |
| Oct 19, 2024 at 21:23 | history | answered | pmw1234 | CC BY-SA 4.0 |