Comment by nickandbro

17 hours ago

Love this, I will now use backface culling for my game:

https://slitherworld.com

Backface culling has been common since the late 1990s when we started using face normals to determine lighting rather than per-vertex lighting. Pretty much every 3D game engine since about 2004 has included and enabled it by default. How is it that you made a game that doesn't use it?

  • I didn't use a game engine

    • Ahhh. So you used a wrapper or a library? Interesting then. I had assumed that almost every rendering method enables frustrum, occlusion, and backface culling by default if only to clear the number of objects needed to be tracked in memory. One thing I noticed in your game is that it's based on the absolute mouse position, which with a 16:9 window makes it difficult to turn in certain situations because your horizontal movement space is much larger than the vertical movement space and that adversely affects turning speed. Changing so that is based just on horizontal mouse movement or adding keyboard controls might be better.

      1 reply →

  • For the curious readers, backface culling (at least in the way fixed-function OpenGL does it, and probably newer APIs still do) is not based on face normals, it's based on winding order of triangles, so it works even if normals are not used.

    Also face normals (flat shading) are generally considered older tech than per-vertex lighting (Gouraud shading). Newer stuff since 2008-ish is generally per-pixel using normal maps for detail.

    • If I remember my graphics accelerator history correctly per-vertex lighting using Gouraud shading was the method SGI made standard with OpenGL in 1992, before 3DFX and ATI came in and made per-pixel via Blinn-Phong just as computationally efficient in about 2000 or 2001. Used before Gouraud and then alongside per-vertex and per-pixel was per-face flat shading, which kept being used up until the Xbox 360/PlayStation 3/DirectX 10 era. Face normals for per-pixel started being used in 1999 by SEGA, but stopped being common around the same time as normals flat shading got abandoned.

      If I'm wrong please feel free to correct any of this, it's been about eight years since I last learned all of the different methods.