You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably requires #12 first. Comparison has to happen in view space. Eye vector would then be a forward vector.
Possible implementation of backface culling:
bool cullBackFacingTriangle(const Vec3 & eye, const Vec3 & v0,
const Vec3 & v1, const Vec3 & v2)
{
// Plane equation of the triangle will give us its orientation
// which can be compared with the viewer's world position.
//
const Vec3 d = crossProduct(v2 - v0, v1 - v0);
const Vec3 c = v0 - eye;
return dotProduct3(c, d) <= 0.0f; // Returns true if it should be discarded
}
The text was updated successfully, but these errors were encountered:
Probably requires #12 first. Comparison has to happen in view space. Eye vector would then be a forward vector.
Possible implementation of backface culling:
The text was updated successfully, but these errors were encountered: