   Software Rendering:  Backface culling
  In my software renderer I''m using the method:x1*y2 - y1*x2 < 0  then the polygon is facing the viewport.This kinda sucks because I have to tranform all the verts and project them before I can cull the backfacing ones.So my question is:1.  Can I do the above method before perspective projecting the verts to the screen?  (This would be like checking for rotation in ortho mode I guess)2.  I know you can use the face normal of the poly and dot (?) product of some other vector to cull the face, but I''m not sure were the other vector comes from (the look at vector of the camera?)?  Can anyone explain that? 
  I think the fastest way is to save the plane of the polygon, as the normal of the plane, and the shortest distance from the origin to the plane (plane equation a,b,c = normal x,y,z. d = distance). Now you can check if the camera is in front or on the back of a polygon very easily. Just calculate the distance from the camera to to the plane. If it's < 0, the camera is on the back of the plane, and so you can backface cull it.To calculate the plane:plane.normal = CrossProduct(vert1 - vert0,vert2 - vert0);plane.dist = DotProduct(vert0,normal);now to calculate the on which side the camera is:float cameraDist = DotProduct(cameraPos,plane.normal) - plane.dist;if(cameraDist < 0){// do backface culling} My Site [edited by - Quasar3D on February 9, 2004 7:25:25 PM];  Only problem with that is I don't have a formal camera yet, I'm just transforming all my verts so the view is down the z axis; guess my camera pos would be 0,0,0 ?EDIT: also I read somewhere that there is a problem with the using normals in boundary cases? Is that true?   [edited by - nonnus29 on February 9, 2004 7:34:29 PM];  Normals are how it''s done, just like quasar3d posted. And if you''re not changing the eye position, then it''s (0,0,0). I don''t understand your question about boundary cases though.   ~CGameProgrammer( ); -- Post screenshots of your projects. There''s already 134 screenshot posts. ;  Yeah, I figured it out; what I get for not googling before posting... ;  A neat trick if you can do the plane culling method mentioned, is to "backtransform" your camera into your object using the inverse of the model/world+camera matrix, and backface cull your object before you even transform anything. 