The DarkPlaces sky has now moved from immediate mode to a vertex and index buffer combination. Index buffers are fun, especially if you try to figure them out from the SDK documentation. Basically you need to do a
mentioned virtually NOWHERE in the documentation. In other words, it's buried in the description of another completely different member function.
Is it in the general discussion on index and vertex buffers?
Is it in any of the tutorials?
Is it in the documentation for
Is it anywhere else someone might think of looking?
No, no, no and no.
It's in the "Reference" section for the IDirect3DDevice9::CreateIndexBuffer Method. A place where someone who's starting off and looking for a quick and dirty leg up will NEVER look. Way to go!
I've ranted about the quality of this documentation before, but this one is worth raising as a classic example of what's wrong.
Moving on...
Skybox loading has gone into the menus now, which has been fun. It's not often that something totally new and weird and different has a chance to come up, but this was the first time I've ever needed to declare and use a
Regarding the DarkPlaces sky, this is now the default sky rendering mode for a number of reasons. Reason 1 is that it most accurately replicates the old classic software Quake sky warp, without the heaving and buckling effect that GLQuake suffered from. On it's own this would be a good thing, but reason 2 is for performance. Because I was able to multitexture it and draw it in a single pass, with use of an index buffer and a very lightweight vertex submission, it should run faster than the DirectQ sphere.
The old DirectQ sphere remains, of course, and can be reverted to by use of the r_skywarp cvar or the appropriate menu option.
All sky options (including skyboxes) use the same Z-fail technique, so geometry positioning is preserved as it should be.
Next I'm going to investigate the Q3A cloud layers and see if I can borrow anything worthy from those. I have something of a feeling that these could run faster still, and if so would be an acceptable tradeoff between "looking like software Quake" and performance. If so, they will likely become the new default.
Wednesday, May 27, 2009
More Skies
Posted by
mhquake
at
10:33 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment