Skybox Graphics Formatted from Online Sources
Swipe to View the Rapids
The graphics for this view of the Storforsen rapids were prepared by Emil Persson, aka Humus. The photographer's Web site is www.humus.name. The graphics are licensed under a Creative Commons Attribution 3.0 Unported License. The Storforsen is part of the Pite River in Sweden.
Seven Thunder Software modified the graphics for use as one texture applied to a cube mesh. Images were reduced in size, placed together in the standard cross format, and offset.
WebGL Scenes with Responsive Web Design
Example WebGL environments
demonstrate how to display a 3D background with basic shaders,
cube environment, and one texture graphic.
This method avoids use of skyboxes, multiple image files, and separate shaders.
Skybox shaders require the
textureCube() function. The e-book's
sampler2D instead of
samplerCube allows many WebGL projects
to render with just one program.
Program switching involves more code as well as
Examples tested well with iPhone 6, Android phone and tablet, Windows PCs with WebGL enabled browsers, and Windows Phone 8.1.