From 4df159dfd740f8f7d52e1b8ce7ce6f4f054745e3 Mon Sep 17 00:00:00 2001 From: David Williams Date: Thu, 17 Jan 2013 23:51:52 +0100 Subject: [PATCH] Changed volume sampler wrap mode. --- library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl b/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl index 61b8f218..8a530c51 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl @@ -169,7 +169,7 @@ namespace PolyVox float sy = (ty ) + m_regSrc.getLowerCorner().getY(); float sz = (tz ) + m_regSrc.getLowerCorner().getZ(); - typename SrcVolumeType::VoxelType result = m_pVolSrc->getVoxelWithWrapping(sx, sy, sz, WrapModes::Clamp); + typename SrcVolumeType::VoxelType result = m_pVolSrc->getVoxelWithWrapping(sx, sy, sz, WrapModes::Border); volDownscaledX.setVoxelAt(tx, ty, tz, result); } @@ -190,7 +190,7 @@ namespace PolyVox float sy = (ty * fScaleY); float sz = (tz ); - typename SrcVolumeType::VoxelType result = volDownscaledX.getVoxelWithWrapping(sx, sy, sz, WrapModes::Clamp); + typename SrcVolumeType::VoxelType result = volDownscaledX.getVoxelWithWrapping(sx, sy, sz, WrapModes::Border); volDownscaledXAndY.setVoxelAt(tx, ty, tz, result); } @@ -210,7 +210,7 @@ namespace PolyVox float sy = (ty - m_regDst.getLowerY()); float sz = (tz - m_regDst.getLowerZ()) * fScaleZ; - typename SrcVolumeType::VoxelType result = volDownscaledXAndY.getVoxelWithWrapping(sx, sy, sz, WrapModes::Clamp); + typename SrcVolumeType::VoxelType result = volDownscaledXAndY.getVoxelWithWrapping(sx, sy, sz, WrapModes::Border); m_pVolDst->setVoxelAt(tx, ty, tz, result); }