I've just spent the best part of 3 evenings tracking down a bug which turned out to be an evil concoction of Quark cleverness and compiler settings. This is annoying - on the one hand we have a tool that does lots of things in a non-standard way (but which somehow produces output that works with most Quake engines), whereas on the other we have voodoo enhanced instruction sets which for the most part work perfectly, except in this particular instance.
A warning to all engine developers:
DON'T ENABLE THE SSE INSTRUCTION SET IN QUAKE ENGINES.
I don't know what Quark does or how it does it, but it is not compatible with SSE. The longer version - lightmap texcoords are derived from a number of factors: vertex positions, surface texturemins values and surface extents values. Texturemins and extents are derived from texcoords, which are defined in the texinfo lump (offsets and scaling). Normal Quake maps have limited precision here, but Quark enhances the precision in a number of magical ways. Now, compared to a normal Quake map, using SSE instructions will cause extents and texturemins to evaluate as being a little off (16 units, which is really just 1 as they multiply by 16).
Where does the fault for this lie?
I could take the blame myself for switching on SSE (apparently I did so in 1.2). I could point the finger at Quark for being different and insisting on using non-standard formats. I could point the finger at the compile tools used for generating the BSP that way. Hell, I could have even discovered a rare SSE bug that Intel don't know about.
Right now though I'm going to bed.
Wednesday, January 28, 2009
If you're not ready for a rant you better turn away now
Posted by
mhquake
at
1:38 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment