id Software Finally Releases Edited Doom 3 Source Code

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.

Create a new thread in the US News comments forum about this subject
This thread is closed for comments
23 comments
    Your comment
    Top Comments
  • gaborbarla
    So creative patented the "Carmack's Reverse" back in '99? Reminds me of the time in the 90s when some company patented cursor flashing using XOr, so all programmers had to write dubiously long code to flash cursors.

    I feel there is something fundamentally wrong with this whole process of patenting.
    21
  • Other Comments
  • kcorp2003
    yeah i was busy looking at this yesterday. i feel old now.
    0
  • gaborbarla
    So creative patented the "Carmack's Reverse" back in '99? Reminds me of the time in the 90s when some company patented cursor flashing using XOr, so all programmers had to write dubiously long code to flash cursors.

    I feel there is something fundamentally wrong with this whole process of patenting.
    21
  • TheDane
    'Carmarck's reverse' might be reintroduced - at least someone seems to know what the code would resemble :-)

    http://www.angelfire.com/games5/duktroa/RealTimeShadowTutorial.htm
    4