ianmackenzie / elm-3d-scene

A high-level 3D rendering engine for Elm, with support for lighting, shadows, and realistic materials.
https://package.elm-lang.org/packages/ianmackenzie/elm-3d-scene/latest/
Mozilla Public License 2.0
205 stars 27 forks source link

Skybox feature #104

Open ivan-jukic opened 3 years ago

ivan-jukic commented 3 years ago

Implemented Skybox functionality for Scene3d, and added a public API for loading and setting the skybox texture.

Skybox currently only supports equirectangular textures. Texture is applied to a quad which renders in the background, and fills the screen, while shaders calculate which part of the texture should be visible on the quad.

Skybox example is provided in the examples folder to demonstrate this functionality, and has an orbiting/rotating camera which allows for the preview of the skybox texture from any angle.

https://user-images.githubusercontent.com/3020399/126223467-f6f4431a-842c-4273-a89f-7aa8678a94a2.mov