apply visible surface detection for cube