The magic of skybox reflections
Skyboxes and environment maps are for sure one of the more powerful tools for physically based rendering to give a scene a touch of realism. A skybox is essentially a cube map rendered onto a cube which we position in the background of our scene. A cube map is a map of 6 textures, one for each internal side of a cube. A normal 2D texture is sampled using uv-coordinates, representing the "x" and "y" axes of the image. That is, each vertex is assigned a uv coordinate, from which a point on the texture is sampled in the fragment shader. For cube maps, as they represent the inside of a cube, for convenience, there is no reason to apply uv-coordinates to sample the texture. Instead, one selects a point using a 3D vector, pointing from the center inside of the cube into any of the textured cube faces. This makes cube maps very handy for light calculations in 3D. Reflections are then mathematically very simple to create using a cube map, as we just have to calculate the re...