Subtract should actually use inverted signed distance

This commit is contained in:
Marc Gilleron 2019-04-28 03:51:24 +01:00
parent 59c5a43915
commit 766e3d882c
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ inline void do_op(VoxelBuffer &buffer, int x, int y, int z, float d1, VoxelIsoSu
break;
case VoxelIsoSurfaceTool::OP_SUBTRACT:
res = MAX(d1, buffer.get_voxel_iso(x, y, z, VoxelBuffer::CHANNEL_ISOLEVEL));
res = MAX(1.0 - d1, buffer.get_voxel_iso(x, y, z, VoxelBuffer::CHANNEL_ISOLEVEL));
break;
case VoxelIsoSurfaceTool::OP_SET: