The sky is a special effect built into the Doom rendering engine.
The original Doom contains three sky textures (SKY1, SKY2 and SKY3), one for each episode. This is consistent with the backstory, because each episode takes place in a specific venue (Phobos, Deimos and Hell, respectively), and the nine levels of each episode share the same sky. The first is a misty gray sky with lumpy greenish mountains, the second is a red overcast sky with brown mountains with light snow, and the third is a much foggier red sky with mountains tinted reddish-black. Ultimate Doom added a fourth sky texture, SKY4, for use in Episode 4, showing orange-tinted clouds with no visible mountains.
Doom II uses the same names for its three sky textures, but the graphics in the IWAD file are different. The engine selects SKY1 for the levels MAP01 through MAP11, depicting a brown partly cloudy sky, SKY2 for MAP12 through MAP20, showing a burning cityscape, and SKY3 for MAP21 through MAP32, which somewhat resembles SKY2 from the original Doom but with bright red cave walls behind the mountains, making it clear the player is in a subterranean Hell. The game is not divided into episodes, of course, but textual interludes divide it into related groups of levels and the sky textures again correspond to the backstory venues: starport, your own home city and alien base (Hell on Earth).
TNT: Evilution's SKY1 is daytime, with a brown sky and snowcapped mountains, and SKY2 is nighttime and filled with stars, with a crude galaxy and a rendering of Supernova 1987a covering large portions of opposite sides of the sky. However, SKY3 is another Hell sky, here bright red and overcast.
The Plutonia Experiment uses grayish-white overcast for SKY1, a somber dark red for SKY2, and bright red hell cave wall for SKY3.
Heretic contains three sky textures (SKY1, SKY2 and SKY3), one for each episode. SKY1 contains a dark gray overcast sky with brown mountains, SKY2 a cloudy red sky with gray mountains, and SKY3 a deep blue underwater "sky" with blue mountains and large struts visibly supporting the dome. Episode 4 and the three unused levels of "Episode 6" simply use SKY1, whereas Episode 5 recycles SKY3.
Hexen does skies in a different manner, allowing for two textures to be used at once as well as scrolling textures (Used, for example, in clouds) and thunder and lightning. Skies in Hexen are defined in the MAPINFO lump.
In order to appear out-of-doors, a sector is given the special ceiling flat name of F_SKY1 (but see below). This flat is not actually drawn, however. The engine recognizes it as indicating that the ceiling is transparent to the sky beyond, and draws sky above the ceiling height. The actual sky texture drawn depends on the episode and/or level number as described above. It is important to note that the sky is drawn similarly to a wall, not like a regular ceiling.
SKY1, SKY2, SKY3 and SKY4 are in an IWAD file as wall textures, each consisting of one or more wall patches. They must be 128 units high. They are always drawn with their tops at the top of the view window and their zero column at due north. A 1024-wide sky will exactly circumscribe the horizon; this effect was first explained in details in the text file accompanying The Unholy Trinity. The sky textures in Doom and Doom II are only 256 units wide, so they are tiled and repeat four times for each full revolution. The sky patches in Heretic and Hexen are 200-unit tall, but the textures itself are still declared to be only 128-unit tall. The additional height, however, is used and serves to prevent tiling when looking up or down.
The sky texture is mirrored compared to how it appears when used as a texture on a wall.
- F_SKY1 may be used for floors as well as ceilings. However, this may cause Hall of Mirrors effect if the player can see too high.
- Hexen uses F_SKY instead of F_SKY1, and Strife uses F_SKY001. All other Doom-engine games use F_SKY1.
- SKY1 et. al. may be used directly as wall textures, but then they just look like paintings. They will be mirror images of what they look like when used as sky.
- If the player can see too far down (past the bottom of the sky texture), a seam will appear between texture tiles. Some ports try to prevent this by stretching sky textures, or by making them blur to a solid color past their limits.
- If two adjacent sectors both have F_SKY1 for their ceiling, the upper texture specified (if any) is ignored. Sky is drawn instead. Comments in the code responsible for this effect call it the "sky hack".
- Animated skies do not work outside of Hexen and certain source ports.
- Sky selection is one reason a PWAD author might select a map slot other than E1M1 or MAP01 (another obvious reason is the music). Of course, with a little more work the author could provide replacement sky or music lumps; or use port-specific features such as MAPINFO to choose the sky and music.
- Most Doom and Doom II sky textures were derived from stock images distributed on MediaClips CD-ROM by Aris Entertainment. 
- The SKY1 texture in The Ultimate Doom was made from a photograph of a Yangshuo cavern which was taken by Tom Atwood (MAJEST3.TIF).
- The SKY2 texture is made from the Zion National Park (ZION.TIF) in the foreground and another picture for the background mountains.
- The SKY3 texture is a composition of several sources: the clouds are taken from a picture of white clouds over distant mountains (MAJEST4.TIF), the mountains are partly sourced from another picture (MAJEST5.TIF), other mountains are derived from pictures of stalagmites (probably from the Carlsbad Caverns National Park).
- The SKY1 texture in Doom II was made from a photograph of sunset clouds over a beach. (WILD4.TIF)
- The smoke from the burning city in SKY2 from Doom II was taken from the take off blast of a Space Shuttle launch. (WORLD2.TIF)
- Blackmantis (29 January 2016). Doomworld forums. Retrieved 29 February 2016. .