For my quake3 map viewer, I’m working on sky rendering optimization.
My sky model is following: I’ve 6 faces that form the skycube, and each face is divided in several quads (in fact 9x9 quads but it can be changed easily). I think quake3 use similar model.
Now I want to optimize rendering like in quake3. When you are looking quake3 in wireframe mode (run a level with “devmap ‘mapname’” and then “r_showtris 1”), you can see that only quads that are behind a window are drawn.
I’ve started doing the same. I make a projection of the vertices of window faces (the faces of the bsp that have a shader with a surface flag representing sky) on the sky cube. So I can find quads (I call them ‘support quads’) that are behind the vertices (look result at " http://www.calodox/morbac/images/skyopt.jpg " - magenta is clear color). The idea is then to fill the quads that are between the support quads, but here come the problems !!
There are lots of complications if support quads are not all on the same face. I tried making clipping between cube faces, but result is not good and method looks slow… and I wonder if I’m still making optimization
Has anyone ideas on quake3 sky rendering optimization ??