Skip to content

Save the image rendered by the OffscreenRendergraph channel #1017

Answered by WdsPjm
WdsPjm asked this question in Q&A
Discussion options

You must be logged in to vote

Just make the following changes in screenshot_image to save only images rendered by offscreenrender

auto physicalDevice = window->getPhysicalDevice();
// auto swapchain = window->getSwapchain();

    // get the colour buffer image of the previous rendered frame as the current frame hasn't been rendered yet.  The 1 in window->imageIndex(1) means image from 1 frame ago.
   
    auto sourceImage = offscreenImageInfo->imageView->image; //  window->imageView(window->imageIndex(1))->image;

    VkFormat sourceImageFormat = offscreenImageInfo->imageView->image->format; // swapchain->getImageFormat();
    VkFormat targetImageFormat = sourceImageFormat;

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@robertosfield
Comment options

@WdsPjm
Comment options

@robertosfield
Comment options

@WdsPjm
Comment options

Answer selected by robertosfield
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants