Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I, a newbie, have been doing back face culling in javascript for my WebGL app because I didn't know gl.cullFace() existed. Is there any reason to use software-based culling instead of just passing all faces to GPU and let it do the culling?

share|improve this question

No. The GPU has dedicated hardware for the purpose, so it will be far faster, especially compared to Javascript. (I wouldn't do anything that iterates over individual verts / faces in JS!)

share|improve this answer

Sometimes, but it depends on your use case and data structures. You can still get a win if your data is set up so that you can cull groups of faces per test, and if doing so doesn't require you to break a batch. Otherwise just let the GPU do it (especially if you have VBOs available).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.