In D3D, if you want to render depth information to a texture and later use that texture as input to a shader you might create a texture with the format DXGI_FORMAT_R24G8_TYPELESS. You would then create two views to the texture, eg. one view with format DXGI_FORMAT_D24_UNORM_S8_UINT for rendering the depth and one SRV with format DXGI_FORMAT_R24_UNORM_X8_TYPELESS for sampling from the texture. How would one go about doing this in Vulkan since VkFormat does not seem to contain any typeless formats?
↧