On Tuesday id Software quietly released the source code behind the studio's 2004 shooter, DOOM 3. Naturally the code doesn't contain any game data, as the DOOM 3 material is still covered by the original EULA. However the source has been altered slightly to avoid possible patent disputes related to Creative Labs' 3D shading technique called "depth fail."
"Lawyers are still skittish about the patent issue around 'Carmack's reverse,' so I am going to write some new code for the doom3 release," John Carmack said via Twitter. "This demonstrates the idiocy of the patent -- the workaround added four lines of code and changed two."
During DOOM 3's development, Carmack independently discovered and publicized a shading process later dubbed as "Carmack's Reverse," but Creative Labs had already filed for a patent on the technique back in 1999. Carmack said he created a separate shading method that got around the patent issues, but that meant a significant "speed hit" in DOOM 3's performance. Thus, the studio had no choice but to license the "depth fail" patent from Creative and move on.
"The Doom 3 GPL source code release does not include functionality enabling rendering of stencil shadows via the 'depth fail' method, a functionality commonly known as 'Carmack's Reverse,'" states the source code notes.
To get the DOOM 3 source code, head here via Github.
I feel there is something fundamentally wrong with this whole process of patenting.
I will admit it's been disturbing that starting with Quake, each engine has taken longer from the release of the initial game to it being GPL'd as open-source: 3 years for Quake, (1996->1999) 4 for Quake II/Id Tech 2, (1997-2001) 6 for Quake III/Id Tech 3 (1999-2005) and now 7 years for Doom 3/Id Tech 4. (2004->2011)