Pull #980 and fix ShadowMappingTest