# `CauldronGPU.Sectors.Live.SkyBox`
[🔗](https://github.com/jaman/cauldron/blob/v0.3.3/cauldron_gpu/lib/cauldron_gpu/sectors/live/sky_box.ex#L2)

A sky picture laid out as Doom draws its sky (`CauldronGPU.Sectors.Sky`: 1024 picture
columns to a full turn, one picture row per 1/160 of elevation's tangent, row 100 at
the horizon, the top and bottom rows carried on above and below), as the six faces of
an `CauldronGPU.Environment` `{:box, faces}` sky.

    faces = CauldronGPU.Sectors.Live.SkyBox.faces(picture, colours, 1.2, 256)

`picture` is a column-by-column `Cauldron2D.Sectors.Pictures` picture, `colours` a
tuple of 256 RGBA binaries, `stretch` how many times taller than wide a map unit is
drawn (heights in the renderer's frame are map heights times it), `size` each face's
width and height in texels. Faces are filtered `:nearest`.

# `faces`

```elixir
@spec faces(map(), tuple(), number(), pos_integer()) :: %{
  required(atom()) =&gt; CauldronGPU.Texture.t()
}
```

The six face textures, keyed as `CauldronGPU.Environment`'s box takes them.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
