Ambient occlusion calcualator now actually uses the return value from isVoxelTransparent.

This commit is contained in:
David Williams 2012-11-03 10:03:46 +01:00
parent 46de894af1
commit 1bfdbbf531

View File

@ -56,12 +56,8 @@ namespace PolyVox
bool operator()(const SimpleVolume<uint8_t>::Sampler& sampler) bool operator()(const SimpleVolume<uint8_t>::Sampler& sampler)
{ {
uint8_t sample = sampler.getVoxel(); uint8_t sample = sampler.getVoxel();
bool func = (*(mIsVoxelTransparentCallback))(sample);
bool direct = sample == 0; return func;
bool func = mIsVoxelTransparentCallback(sample);
assert(direct == func);
return direct;
} }
const IsVoxelTransparentCallback& mIsVoxelTransparentCallback; const IsVoxelTransparentCallback& mIsVoxelTransparentCallback;