in unity/Assets/Scripts/Recorder.cs [237:282]
public void ResetBatch(IList<Camera> capture_cameras, int batch_size, int width, int height, bool alpha,
bool depth, bool normals, bool segmentation) {
HashSet<Recorder.CameraSetup.CameraType> camera_types = new HashSet<Recorder.CameraSetup.CameraType>();
camera_types.Add(Recorder.CameraSetup.CameraType.RGB);
if (depth || normals) {
camera_types.Add(Recorder.CameraSetup.CameraType.DEPTH_NORMALS);
}
if (segmentation) {
camera_types.Add(Recorder.CameraSetup.CameraType.SEGMENTATION);
}
foreach (CameraSetup.CameraType camera_type in System.Enum.GetValues(typeof(CameraSetup.CameraType))) {
if (!camera_types.Contains(camera_type)) {
camera_setups_.Remove(camera_type);
continue;
}
if (!camera_setups_.ContainsKey(camera_type)) {
camera_setups_.Add(camera_type, new List<CameraSetup>());
}
for (int i = 0; i < capture_cameras.Count; ++i) {
if (camera_setups_[camera_type].Count < i + 1) {
camera_setups_[camera_type].Add(new CameraSetup(capture_cameras[i], batch_size,
width, height, alpha, camera_type));
} else {
camera_setups_[camera_type][i].ResetBatch(capture_cameras[i], batch_size,
width, height, alpha, camera_type);
}
}
}
if (capture_width_ != width || capture_height_ != height || capture_alpha_ != alpha) {
capture_width_ = width;
capture_height_ = height;
capture_alpha_ = alpha;
PrepareRenderTextures();
}
capture_depth_ = depth;
capture_normals_ = normals;
batch_size_ = batch_size;
RoundRobinRenderTextures();
capture_count_ = 0;
capture_next_frame_ = false;
}