Hi

After frustum back-face culling might directly use the z-component of the surface normal.

It is said the triangle is clipped when the normal is negtive.

But the following vincent code made me confused.I do not exactly know how you calculate the "sign"!

Would you like to give me a detail answer.Thanks!

IsCulled():

if (((x0 & 0xff000000) == 0 || (x0 & 0xff000000) == 0xff000000) &&

((y0 & 0xff000000) == 0 || (y0 & 0xff000000) == 0xff000000) &&

((z0 & 0xff000000) == 0 || (z0 & 0xff000000) == 0xff000000)) {

sign =

+ Round(x0) * (MulLong(Round(y1), Round(z2)) - MulLong(Round(z1), Round(y2)))

- Round(y0) * (MulLong(Round(x1), Round(z2)) - MulLong(Round(z1), Round(x2)))

+ Round(z0) * (MulLong(Round(x1), Round(y2)) - MulLong(Round(y1), Round(x2)));

} else {

sign =

+ Round(x0 >> 6) * (MulLong(Round(y1), Round(z2)) - MulLong(Round(z1), Round(y2)))

- Round(y0 >> 6) * (MulLong(Round(x1), Round(z2)) - MulLong(Round(z1), Round(x2)))

+ Round(z0 >> 6) * (MulLong(Round(x1), Round(y2)) - MulLong(Round(y1), Round(x2)));

}

Thanks and regards