Work on unclassing the ambient occlusion calculation as it is currently making use of the old raycasts.

This commit is contained in:
David Williams
2012-10-02 21:05:09 +02:00
parent 191d04ec02
commit 419fa2e5d4
2 changed files with 127 additions and 5 deletions

View File

@ -61,11 +61,8 @@ void TestAmbientOcclusionGenerator::testExecute()
const int32_t g_uArraySideLength = g_uVolumeSideLength / 2;
Array<3, uint8_t> ambientOcclusionResult(ArraySizes(g_uArraySideLength)(g_uArraySideLength)(g_uArraySideLength));
//Create the ambient occlusion calculator
AmbientOcclusionCalculator< SimpleVolume<uint8_t> > calculator(&volData, &ambientOcclusionResult, volData.getEnclosingRegion(), 32.0f, 255, isVoxelTransparent);
//Execute the calculator
calculator.execute();
// Calculate the ambient occlusion values
calculateAmbientOcclusion(&volData, &ambientOcclusionResult, volData.getEnclosingRegion(), 32.0f, 255, isVoxelTransparent);
//Check the results by sampling along a line though the centre of the volume. Because
//of the two walls we added, samples in the middle are darker than those at the edge.