diff --git a/components/renderers/cpp/src/splat_render.cpp b/components/renderers/cpp/src/splat_render.cpp index 7cba3d7b80a4095c77316077725f2ad7a77b9de5..9ea54526db9273a3787c510f4974157ef71e414e 100644 --- a/components/renderers/cpp/src/splat_render.cpp +++ b/components/renderers/cpp/src/splat_render.cpp @@ -311,7 +311,16 @@ bool Splatter::render(ftl::rgbd::VirtualSource *src, ftl::rgbd::Frame &out) { out.create<GpuMat>(Channel::Depth, Format<float>(camera.width, camera.height)); out.create<GpuMat>(Channel::Colour, Format<uchar4>(camera.width, camera.height)); + if (scene_->frames.size() == 0) return false; + + int aligned_source = value("aligned_source",-1); + if (aligned_source >= 0 && aligned_source < scene_->frames.size()) { + // FIXME: Output may not be same resolution as source! + scene_->frames[aligned_source].swapTo(Channel::Depth + Channel::Colour, out); + return true; + } + auto &g = scene_->frames[0].get<GpuMat>(Channel::Colour); temp_.create<GpuMat>(Channel::Colour, Format<float4>(camera.width, camera.height));