precise shadowcasting fixes