Fix render loop so only closest object gets shaded