Skip to content
Snippets Groups Projects
Commit 876adb24 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Move source align

parent 34283987
No related branches found
No related tags found
1 merge request!137Partial work on filling
Pipeline #15535 passed
...@@ -315,14 +315,6 @@ bool Splatter::render(ftl::rgbd::VirtualSource *src, ftl::rgbd::Frame &out) { ...@@ -315,14 +315,6 @@ bool Splatter::render(ftl::rgbd::VirtualSource *src, ftl::rgbd::Frame &out) {
if (scene_->frames.size() == 0) return false; 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); auto &g = scene_->frames[0].get<GpuMat>(Channel::Colour);
temp_.create<GpuMat>(Channel::Colour, Format<float4>(camera.width, camera.height)); temp_.create<GpuMat>(Channel::Colour, Format<float4>(camera.width, camera.height));
...@@ -403,6 +395,14 @@ bool Splatter::render(ftl::rgbd::VirtualSource *src, ftl::rgbd::Frame &out) { ...@@ -403,6 +395,14 @@ bool Splatter::render(ftl::rgbd::VirtualSource *src, ftl::rgbd::Frame &out) {
} }
} }
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!
cudaSafeCall(cudaStreamSynchronize(stream_));
scene_->frames[aligned_source].swapTo(Channel::Depth + Channel::Colour, out);
return true;
}
_dibr(stream_); _dibr(stream_);
_renderChannel(out, Channel::Colour, Channel::Colour, stream_); _renderChannel(out, Channel::Colour, Channel::Colour, stream_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment