6. In $\triangle A B C$, it is known that $a^{4}+b^{4}+c^{4}=2 c^{2} \left(a^{2}+b^{2}\right)$. Then the degree of $\angle C$ is ( ).
(A) $30^{\circ}$
(B) $60^{\circ}$
(C) $120^{\circ}$
(D) $45^{\circ}$ or $135^{\circ}$
6. Given $a^{4}-b^{4}+c^{6}-2 a^{2} c^{2}-2 b^{2} c^{2}=0$, we have
$$
\begin{array}{r}
\left(u^{2}+\sqrt{2} a b+b^{2}-c^{2}\right)\left(a^{2}-\sqrt{2} a b+b^{2}-c^{2}\right)=0 \\
\quad c^{2}=a^{2}+b^{2}+\sqrt{2} a b, \quad c^{2}=a^{2}+b^{2}-\sqrt{2} a b
\end{array}
$$

Thus, $\cos C= \pm \frac{\sqrt{2}}{2}, \angle C=45^{\circ}$ or $135^{\circ}$.
Choose D.