Any quake mod that supports Back face culling?
-
Mexicouger
- Posts: 514
- Joined: Sat May 01, 2010 10:12 pm
- Contact:
Any quake mod that supports Back face culling?
I Looked at darkplaces, and it doesn't look like it supports it, is there any other mods that do? I eagerly want to see how it was implemented.
Re: Any quake mod that supports Back face culling?
[removed by self]
Last edited by Baker on Sun May 01, 2011 3:44 pm, edited 1 time in total.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Backface culling can be typically done in hardware or software (or both). Hardware is just a matter of glCullFace, software is done by the BACKFACE_EPSILON/SURF_PLANEBACK stuff (search through the engine source for those two and you'll find all that you need to know).
Why would you do it in software? Simple reason is that if you only do it in hardware then the relevant vertexes need to be sent to the GPU, transformed and recomposed into triangles before they can be culled by hardware. Do it in software too and you can cull on a per-surface level without any of that unnecessary overhead.
Interesting to note that there is a backface culling test in R_RecursiveWorldNode that is completely unnecessary as surfaces are already backfaced properly by the BSP tree walk. It is highly effective for brush model entities though.
Sometimes you don't want to backface cull. There's no point in culling particles and sprites as they're screen-aligned quads which will always be facing the viewpoint. The backface cull test itself is a little bit of extra overhead so in cases like this there's no tradeoff and you want to avoid it.
Why would you do it in software? Simple reason is that if you only do it in hardware then the relevant vertexes need to be sent to the GPU, transformed and recomposed into triangles before they can be culled by hardware. Do it in software too and you can cull on a per-surface level without any of that unnecessary overhead.
Interesting to note that there is a backface culling test in R_RecursiveWorldNode that is completely unnecessary as surfaces are already backfaced properly by the BSP tree walk. It is highly effective for brush model entities though.
Sometimes you don't want to backface cull. There's no point in culling particles and sprites as they're screen-aligned quads which will always be facing the viewpoint. The backface cull test itself is a little bit of extra overhead so in cases like this there's no tradeoff and you want to avoid it.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for