I am relatively new to vulkan. I am having this weird issue, where say I write a very small floating point to an FBO, it gets rounded to 0. For example, say I write outFrag = vec4(1.0e-39,0,0,1); this gets stored as (0,0,0,1). I've found this issue when I run the code on an Nvidia GPU (1060), but it works fine on an Intel integrated GPU. (The image format I am using the for the FBO is VK_FORMAT_R32G32B32A32_SFLOAT).
On the other hand, if I write the same value to a float buffer, it gets written correctly! I am not sure if there is any specific property I need to set to fix this.
(For context, I need to write integers into the the float FBO, and I cannot use an int FBO since I need Blend enabled. So I am trying to use intBitsToFloat() which results in very small float values depending on the integer.)
EDIT: The alternative is to use Logic operations on a integer frame buffer with VK_LOGIC_OP_COPY. However, when I tried this, I get no output at all. (actually simply enabling blend with the integer FBO gives a validation error, but I get the required output -- this might simply be the drivers not being strict, but I would ideally not want to use something which might break my code in the future).
Any help is much appreciated.