8. Given that $f(x)$ is an increasing function on $\mathbf{R}$, and for any $x \in$ $\mathbf{R}$, we have
$$
f\left(f(x)-3^{x}\right)=4 .
$$

Then $f(2)=$
8. 10 .

From the problem, we know that $f(x)-3^{x}$ is a constant. Let's assume $f(x)-3^{x}=m$.
Then $f(m)=4, f(x)=3^{x}+m$.
Therefore, $3^{m}+m=4 \Rightarrow 3^{m}+m-4=0$.
It is easy to see that the equation $3^{m}+m-4=0$ has a unique solution $m=1$.
Thus, $f(x)=3^{x}+1$,
and hence, $f(2)=3^{2}+1=10$.