Compact Precomputed Voxelized Shadows




  • Paper topic: Rendering
  • Software type: Code
  • Able to run a replicability test: True
  • Replicability score: 3
  • Software language: C/C++
  • License: unspecified
  • Build mechanism: IDE Project (VS,..)
  • Dependencies: cuda / embree / glew / glut / wxWidgets
  • Documentation score {0,1,2}: 2
  • Reviewer: Nicolas Bonneel <>
  • Time spent for the test (build->first run, timeout at 100min): 100min

Source code information


I compile the code with VS2017 and Cuda 10.2, which is quite far from the original project settings (VS2014 6.5). Step by step:
- You need to edit the CPVS2014.vcxproj, replacing at line 55 <Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 6.5.props" /> by the place where you have your Cuda 10 property sheets (in my case "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\extras\visual_studio_integration\MSBuildExtensions\CUDA 10.2.props"). And similarly in line 185 for the Cuda targets (same folder). And then open the project with visual studio, update/retarget the project file.
- You need to use a fresh wxWidget, since the one provided is precompiled for VS2014. Go to and download the precompiled binaries for windows (headers and release DLLs). Replace the original wxWidget folder with these downloads (same fold hierarchy).
- add wxMSVC_VERSION=14x as a preprocessor directive for the projects CHAGApp and CPVS2014 and remove wxMSVC_VERSION_AUTO
- replace compute_20,sm_20 in Cuda C/C++->Device->Code Generation to compute_30,sm_30 in the project CPVS2014
- add #include <intrin.h> in CompressedShadow.cpp
- Change WINVER=0x0400 to WINVER=0x0500 in the preprocessor directives of CHAGApp and CPVS2014
- Change the library path ../wxWidgets/lib/vc120_x64_dll  to ../wxWidgets/lib/vc14x_x64_dll
- Change the libraries being linked from wxmsw30u_core.lib and wxbase30u.lib to wxmsw31u_core.lib and wxbase31u.lib
- In line 115 of GLSLProgramManager.cpp, replace return shader; by return "#version 420 compatibility\n"+shader;  This is quite a hack, but works in my case. Remove *all* mentions of #version 400 or 420 in all shader files (Application.glsl, CPVSBuilder.glsl, Scene.glsl) since you are now only allowed a single call to "#version" in the first line of the shader.
- Compile the code, and put the .exe and the wxWidgets dll in the CPVS2014 folder (where there is a subfolder "media").
You can now launch the .exe and play with it. There is a very nice Readme.pdf that gives step by step instructions to compress shadow maps. I lowered the reproducibility score for the main reason that the proposed implementation differs from what is explained in the paper (the Readme.pdf explains the differences), and for the secondary reason that the scene files used in the paper are not provided, so it is difficult to appreciate the differences between the new and original implementation in term of results. However, the code works well and shows crisp shadows.

If you want to contribute with another review, please follow these instructions.

Please consider to cut/paste/edit the raw JSON data attached to this paper.