in unity/Assets/Scripts/Recorder.cs [126:158]
public void ResetBatch(Camera camera, int batch_size, int width, int height,
bool alpha, CameraSetup.CameraType camera_type) {
if (width != width_ || height != height_ || alpha != alpha_) {
captured_images_.Clear();
width_ = width;
height_ = height;
alpha_ = alpha;
}
if (camera_type_ != camera_type || camera.name != camera_name_) {
camera_type_ = camera_type;
camera_name_ = camera.name;
camera_ = PrepareCamera(camera);
}
batch_size_ = batch_size;
if (captured_images_.Count > 2 * batch_size && batch_size >= 32) {
captured_images_.RemoveRange(batch_size, captured_images_.Count - batch_size);
return;
}
while (captured_images_.Count < batch_size) {
TextureFormat format;
if (camera_type_ == CameraType.DEPTH_NORMALS) {
format = TextureFormat.RGBAFloat;
} else {
format = alpha ? TextureFormat.RGBA32 : TextureFormat.RGB24;
}
Texture2D capture_image = new Texture2D(width, height, format, false);
captured_images_.Add(capture_image);
}
}