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?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
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!) |
|||
|
|
|
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). |
|||
|
|