I’m trying to understand how the process of “binding” different render passes work in the same commandBuffer for doing full screen post processing effects.
In opengl it’s pretty clear that when we bind a frameBuffer and render into its attachment, we can then later bind this attachment as a regular texture :
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
the line 6 is pretty clear that we bind the previus framebuffer colorAttachment as a texture. However reading the sascha willems radial blur example I can’t see what’s the equivalent process of that. I can’t see the conection betwen the render passes, where exactaly is it saying that the attachment of using in one renderpasse’s frameBuffer is going to be used as input to another.
Sorry if i didn’t made myself clear.
SaschaWillems radial blur example: https://github.com/SaschaWillems/Vulkan/blob/master/examples/radialblur/radialblur.cpp
Is it really “pretty clear”? I would say that it’s only clear if you know that
hdrColorBufferTexture is a texture that is somewhere in
hdrFBO. After all, you didn’t show any of the setup code for
hdrFBO, so I only have your word that you attached
It says exactly what your code says. In one renderpass, you can see that a texture is being used as a renderpass attachment by its presence in a
VkFramebuffer. At some point during the rendering of the second renderpass, you can see that this same texture is being used in a texture descriptor and not in that renderpass’s
VkFramebuffer. There should of course be some kind of barrier or external subpass dependency ensuring that the previous renderpass finishes with the texture before the subpass containing the commands that read from that texture.
I’m not going to go through the near 700 lines of code to find the exact location where these things are, but those will be what you’re looking for.
Thank you. I haven’t notice that the attachment is used in the second render pass a Image Descriptor.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.