I wanted to implement a Vulkan compute shader where some data is written to a VkImage via ‘imageStore’ that is afterwards copied to the Swapchain (and displayed).
Initially it would just show a black screen but after trying out different things I managed to make it work by setting the image format to ‘
rgba32f’ in the shader.
However if I understand it correctly, the image format specified in the shader should be converted to the image format specfied by the binding function, at least according to the khronos wiki? (Image Load Store#Format conversion)
But even if that wasn’t the case, I don’t know why it only seems to work with ‘
rgba32f’ since I’m using the ‘
VK_FORMAT_B8G8R8A8_UNORM’ format when creating the VkImage, so I would only expect a format like ‘
rgba8ui’ to work in the shader.
I can paste the whole shader code here if required, but in regards to the Vulkan code I’m not sure what parts would be useful (and the whole code is too much to paste here).