8. In the Cartesian coordinate system, color the points in the set $\{(m, n) \mid m, n \in \mathbf{N}, 1 \leqslant m, n \leqslant 6\}$ red or blue. Then, the number of different coloring schemes where each unit square has exactly two red vertices is $\qquad$ .
8. 126 .

First, color the first row (points with a y-coordinate of 6), which has $2^{6}$ ways of coloring. We can divide this into two cases:
(1) No two adjacent points are the same color (i.e., red and blue alternate), there are 2 ways to color, in this case, there are only 2 ways to color the second row. Similarly, each row has 2 ways to color, resulting in a total of $2^{6}$ ways.
(2) At least two adjacent points are the same color, there are $2^{6}-2$ ways to color, in this case, when coloring the second row, it can be found that the coloring method that meets the requirements is unique. Similarly, the coloring method for each row is unique. Therefore, there are $2^{6}-2$ ways in total.
Combining (1) and (2), the total number of coloring methods that meet the conditions is $2^{6}+\left(2^{6}-2\right)=2^{7}-2=126$.