Screenshot with Post Process not includes meshes

Hi, guys. I got a weird problem.

When I screenshot by the RenderTargetTexture, everything is okay

Screenshot without postprocess

But if set the camera DefaultRenderingPipeline enabled, the screenshot has no meshes.

Screenshot with postprocess

Then screenshot with postprocess again, the meshes were included.

Screenshot with postprocess twice

Here is the playground.

This PR will fix the problem:

The problem was that a new effect was created when rendering to the rtt, but the effect was not ready right away, so the mesh was not rendered. I also added a way to modify the properties of the rtt before taking the screenshot, that way you can easily set the useCameraPostProcesses property.

Once the PR is merged, this PG will work as expected:


Update to the latest version, the problem was fixed. Thank you, you guys are awesome!!!

Hi, I recently use the PBR SubSurface Scattering, the document shows the scattering is using postprocess to implement this effect.

The demo shows screenshot with scattering is an empty image.

The prepass renderer only works when the rendering is performed into the main scene framebuffer, not into other RTTs. So, you should use CreateScreenshot instead of CreateScreenshotUsingRenderTarget:

Thx for your reply, Is there any way to exclude the gui component when using CreateScreenshot.

you could try smthg like guiTexture.layer.renderOnlyInRenderTargetTextures = true before taking a screenshot and then false again.

1 Like