For some reason shader compilation takes too much time, even using D3DCOMPILE_SKIP_OPTIMIZATION and D3DCOMPILE_SKIP_VALIDATION flags did not help. Need to take a closer look.
Precomputed values in the textures are slightly different from the ones in the original project. It was really hard to track the values computed by the shaders, but if my readings from RenderDoc are correct, glsl and hlsl versions of sqrt() give slightly different results. I do not know if this small discrepancy accounts for
the differences or there is an extra subtle bug somewhere. For usual view and sun positions there is no visible difference between the original demo and this one, but it is there.