8. In the Cartesian coordinate system, color the set of points
$$
\left\{(m, n) \mid m, n \in \mathbf{Z}_{+}, 1 \leqslant m, n \leqslant 6\right\}
$$

red or blue. Then the number of different coloring schemes where each unit square has exactly two red vertices is $\qquad$
8. 126 .

Dye the first row (points with a y-coordinate of 6), there are $2^{6}$ ways to do this, which can be divided into two cases.
(1) No two adjacent points are the same color (i.e., red and blue alternate), there are 2 ways, and the second row can only be dyed in 2 ways, each row has only 2 ways, for a total of $2^{6}$ ways;
(2) There are at least two adjacent points of the same color, there are $2^{6}-2$ ways to dye, in this case, when dyeing the second row, it can be found that the dyeing method that meets the requirements is unique, for a total of $2^{6}-2$ ways.

In summary, the number of dyeing methods that meet the conditions is $2^{6}+2^{6}-2=126$.