diff --git a/components/renderers/cpp/src/CUDARender.cpp b/components/renderers/cpp/src/CUDARender.cpp index d407db476a0c4fc04b015043ee5de794e5809206..7393fec643bd34dcd79fac2a0b5a04e6287345a7 100644 --- a/components/renderers/cpp/src/CUDARender.cpp +++ b/components/renderers/cpp/src/CUDARender.cpp @@ -642,6 +642,7 @@ void CUDARender::_renderPass2(Channels<0> chans, const Eigen::Matrix4d &t) { // Reprojection of colours onto surface auto main_channel = (scene_->frames[0].hasChannel(Channel::ColourHighRes)) ? Channel::ColourHighRes : Channel::Colour; + LOG(INFO) << "USING COLOR: " << (int)main_channel; _renderChannel(*out_, main_channel, Channel::Colour, t, stream_); diff --git a/components/renderers/cpp/src/mask.cu b/components/renderers/cpp/src/mask.cu index e46c2a131e94ef7fa43d8d1805ff96d8091026ef..e23012c7be7988bdf5d599c296db2df6ebce442d 100644 --- a/components/renderers/cpp/src/mask.cu +++ b/components/renderers/cpp/src/mask.cu @@ -15,7 +15,10 @@ __global__ void show_mask_kernel( const int y = blockIdx.y*blockDim.y + threadIdx.y; if (x >= 0 && x < colour.width() && y >=0 && y < colour.height()) { - Mask m(mask.tex2D(x,y)); + float xscale = (float)x * ((float)mask.width() / (float)colour.width()); + float yscale = (float)y * ((float)mask.height() / (float)colour.height()); + + Mask m(mask.tex2D((int)xscale,(int)yscale)); if (m.is(id)) { colour(x,y) = style;