improvements to speed up Clashtest and image reflection shaders