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

Fix show mask image size bug

parent b39a3999
No related branches found
No related tags found
No related merge requests found
......@@ -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_);
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment