From f4917e500114c819af8b05ef81487b3fc3ec586b Mon Sep 17 00:00:00 2001 From: David Williams Date: Sun, 2 Dec 2012 17:43:36 +0100 Subject: [PATCH] Added an optimization note. --- .../include/PolyVoxCore/AmbientOcclusionCalculator.inl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.inl b/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.inl index 4c874f24..1c3c9727 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.inl @@ -98,6 +98,8 @@ namespace PolyVox AmbientOcclusionCalculatorRaycastCallback ambientOcclusionCalculatorRaycastCallback(isVoxelTransparentCallback); RaycastResult result = raycastWithDirection(volInput, v3dRayStart, v3dRayDirection, ambientOcclusionCalculatorRaycastCallback); + // Note - The performance of this could actually be improved it we exited as soon + // as the ray left the volume. The raycast test has an example of how to do this. if(result == RaycastResults::Completed) { ++uVisibleDirections;