set optimizeForRenderToTexture to false