Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.