id Tech 4, first used for "Doom 3" (2004), used an entirely dynamic per-pixel lighting, whereas previously, 3D engines had relied primarily on pre-calculated per-vertex lighting or lightmaps and Gouraud shading. The Shadow volume approach used in Doom 3 permitted more realistic lighting and shadows, however this came at a price as it could not render soft shadows, and the engine was primarily good indoors. Later this was rectified to work with vast outdoor spaces, with the introduction of MegaTexture technology in the id Tech 4 engine.