Plan depth export through document renderer

This commit is contained in:
2026-06-05 21:03:27 +02:00
parent 3c36be4b43
commit 3be7171010
10 changed files with 443 additions and 14 deletions

View File

@@ -156,6 +156,29 @@ struct DocumentFrameEquirectangularPngExportResult {
std::size_t composited_layer_face_count = 0;
};
struct DocumentDepthExportRenderPlanRequest {
const pp::document::CanvasDocument* document = nullptr;
std::size_t frame_index = 0;
pp::renderer::Extent2D output_extent {
.width = 1024,
.height = 1024,
};
};
struct DocumentDepthExportRenderPlan {
pp::renderer::Extent2D output_extent {
.width = 1024,
.height = 1024,
};
std::size_t merged_face_draw_count = 0;
std::size_t layer_depth_draw_count = 0;
std::size_t visited_layer_count = 0;
std::size_t visible_layer_count = 0;
std::size_t face_payload_count = 0;
bool uses_perspective_camera = true;
bool requires_renderer_readback = true;
};
struct DocumentLayerEquirectangularPngExportRequest {
const pp::document::CanvasDocument* document = nullptr;
std::size_t frame_index = 0;
@@ -232,6 +255,9 @@ export_document_frame_equirectangular_png(const DocumentFrameCompositeResult& co
[[nodiscard]] pp::foundation::Result<DocumentFrameEquirectangularPngExportResult>
export_document_frame_equirectangular_png(DocumentFrameCompositeRequest request);
[[nodiscard]] pp::foundation::Result<DocumentDepthExportRenderPlan> plan_document_depth_export_render(
DocumentDepthExportRenderPlanRequest request) noexcept;
[[nodiscard]] pp::foundation::Result<DocumentLayerEquirectangularPngExportResult>
export_document_layers_equirectangular_pngs(DocumentLayerEquirectangularPngExportRequest request);