8. Let the circumcenter of $\triangle A B C$ be $O$, the incenter be $I$, and $\angle B=$ $45^{\circ}$. If $O I / / B C$, then the value of $\cos C$ is $\qquad$.
8. $1-\frac{\sqrt{2}}{2}$.

Let the circumradius and inradius of $\triangle ABC$ be $R$ and $r$, respectively.

Let $M$ be the midpoint of $BC$, and $D$ be the foot of the perpendicular from $I$ to $BC$.
Since $OI \parallel BC$, we have $OM = ID = r$.
$$
\begin{array}{l}
\text { By } \angle BOC = 2 \angle A, BC = BD + DC = 2BM \\
\Rightarrow \frac{r}{\tan \frac{B}{2}} + \frac{r}{\tan \frac{C}{2}} = 2r \tan A \\
\Rightarrow \frac{\cos \frac{A}{2}}{\sin \frac{B}{2} \cdot \sin \frac{C}{2}} = \frac{2 \sin A}{\cos A} \\
\Rightarrow \cos A = 4 \sin \frac{A}{2} \cdot \sin \frac{B}{2} \cdot \sin \frac{C}{2} \\
= \cos A - 1 + (\cos B + \cos C) \\
\Rightarrow \cos B + \cos C = 1 \\
\Rightarrow \cos C = 1 - \frac{\sqrt{2}}{2} .
\end{array}
$$