Render to texture without vkCmdBlitImage.

I done render to texture. But now i use vkCmdBlitImage.
Now i have two textures. FrameRenderToTexture and ShaderTexture.
I render to FrameRenderToTexture then vkCmdBlitImage to ShaderTexture. Then render 3d model with ShaderTexture. And I see what was in FrameRenderToTexture.
How direct render to ShaderTexture and not use vkCmdBlitImage ?
https://www.youtube.com/watch?v=kOD6s0_UPPc&feature=youtu.be

What’s stopping you from doing the obvious and rendering to “ShaderTexture”?

I mean, at some point, you had to create a render pass instance. And when you did so, you had to put this “FrameRenderToTexture” into that render pass instance.

So what is preventing you from just putting “ShaderTexture” there instead?

If i use ShaderTexture, i not get result !
I get result with FrameRenderToTexture.
For this reason ask.

For ShaderTexture image.usage = VK_IMAGE_USAGE_SAMPLED_BIT
For FrameRenderToTexture image.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT + VK_IMAGE_USAGE_TRANSFER_SRC_BIT

OK, that’s my fault for assuming that you knew that you would have to tell Vulkan that you intended to use it as a color attachment. And you need to make sure that it uses the appropriate layout for the operation. And you need a memory dependency between the writing operation and the reading operation. And probably two separate render passes, unless you’re willing to use it as an input attachment (which requires a subpass).

Yes, you cannot just slap the texture in there. You have to do what Vulkan tells you that you have to do to use an image as a render target as well as all of the things Vulkan tells you that you have to do to use an image as a sampled image.