- Home /
batchmode and screenshots.
Hello
I am attempting to run a build of my game in batch mode, for server side screenshot rendering in response to some events, etc. To test this, I am attempting to run batchMode flag, with a build that writes out screenshots.
I am noticing a few quirks, firstly, I have to use the following script to get anything written to the screenshot if I am in batchMode:
This script is on my main (and only) camera: https://gist.github.com/2304311
Using Application.CaptureScreenshot("Screenshot.png"); Fails, producing a black png while in batchMode, but works windowed, and in the editor.
Secondly, I've noticed that the above script only seems to work with a forward renderer. Attempting to use a deferred renderer and taking a screenshot produces odd artifacts.
Some example screenshots: http://imgur.com/a/gyluO#0
First is Deferred Batch, Second Deferred Windowed, Third is Forward Batch, Last is Forward Windowed. It appears as though some buffer needs to be cleared, or over-written, but I am unclear how and or why I need to do this.
I would prefer to be able to run my batch in deferred mode, due to some post processing/morphological AA I can do via screen based effect.. Thank you for any information on this.
$$anonymous$$oderator, apologies, I did not realize my earlier submission needed moderation. Feel free to delete this, or the earlier question. Thank you.
Your answer
![](https://koobas.hobune.stream/wayback/20220613065911im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Mixing Deferred Lighting and Forward rendering paths 2 Answers
Take screenshot in batchmode 0 Answers
Culling Masks with Deferred Lighting 0 Answers
Changing Rendering Path from script 1 Answer
Unity Surface Shader - Deferred lighting viewDir and lightDir 0 Answers