diff --git a/components/operators/src/antialiasing.cpp b/components/operators/src/antialiasing.cpp index d3c63ce1b886023ff7611fc599da0bbe2b4cc094..575cc26a5183f38dbaa0c861bac5a0cbe70ace18 100644 --- a/components/operators/src/antialiasing.cpp +++ b/components/operators/src/antialiasing.cpp @@ -18,5 +18,12 @@ bool FXAA::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, ftl::rgbd::Source stream ); + if (in.hasChannel(Channel::Right)) { + ftl::cuda::fxaa( + in.getTexture<uchar4>(Channel::Right), + stream + ); + } + return true; } diff --git a/components/operators/src/antialiasing.cu b/components/operators/src/antialiasing.cu index f0b64bd89b209836e330776fbadc901a57f11ed1..7ad851a2af3508b6a0728b0081fc00ec879ac088 100644 --- a/components/operators/src/antialiasing.cu +++ b/components/operators/src/antialiasing.cu @@ -71,6 +71,7 @@ __global__ void filter_fxaa2(ftl::cuda::TextureObject<uchar4> data) { //surf2Dwrite<uchar4>(out_color, surfaceWrite, x*sizeof(uchar4), y); + // FIXME: Should not output to same texture object. data(x,y) = out_color; } diff --git a/components/renderers/cpp/src/tri_render.cpp b/components/renderers/cpp/src/tri_render.cpp index 7998cae177cfec9f73dd93fa4c5466fe87c19ac2..5aa6e7df20fcbe4f5d279d8bcd47512ed813b028 100644 --- a/components/renderers/cpp/src/tri_render.cpp +++ b/components/renderers/cpp/src/tri_render.cpp @@ -628,6 +628,7 @@ bool Triangular::render(ftl::rgbd::VirtualSource *src, ftl::rgbd::Frame &out) { out.create<GpuMat>(Channel::Right, Format<uchar4>(camera.width, camera.height)); out.get<GpuMat>(Channel::Right).setTo(background_, cvstream); + out.createTexture<uchar4>(Channel::Right, true); // Need to re-dibr due to pose change if (mesh_) {