diff --git a/assets/environments/debug/debug.png b/assets/environments/debug/debug.png index c8bfb7c934..5a8c58c771 100644 Binary files a/assets/environments/debug/debug.png and b/assets/environments/debug/debug.png differ diff --git a/filament/include/filament/Skybox.h b/filament/include/filament/Skybox.h index 8e740418aa..97374f7b18 100644 --- a/filament/include/filament/Skybox.h +++ b/filament/include/filament/Skybox.h @@ -79,6 +79,13 @@ public: /** * Set the environment map (i.e. the skybox content). * + * The Skybox is rendered as though it were an infinitely large cube with the camera + * inside it. This means that the cubemap which is mapped onto the cube's exterior + * will appear mirrored. This follows the OpenGL conventions. + * + * The cmgen tool generates reflection maps by default which are therefore ideal to use + * as skyboxes. + * * @param cubemap This Texture must be a cube map. * * @return This Builder, for chaining calls. diff --git a/filament/include/filament/Texture.h b/filament/include/filament/Texture.h index 13a5314b3a..502299ebe9 100644 --- a/filament/include/filament/Texture.h +++ b/filament/include/filament/Texture.h @@ -279,6 +279,8 @@ public: /** * Specify all six images of a cube map level. * + * This method follows exactly the OpenGL conventions. + * * @param engine Engine this texture is associated to. * @param level Level to set the image for. * @param buffer Client-side buffer containing the images to set. diff --git a/tools/cmgen/src/CubemapUtils.cpp b/tools/cmgen/src/CubemapUtils.cpp index 650936af99..d5a5d0057a 100644 --- a/tools/cmgen/src/CubemapUtils.cpp +++ b/tools/cmgen/src/CubemapUtils.cpp @@ -201,12 +201,12 @@ void CubemapUtils::mirrorCubemap(Cubemap& dst, const Cubemap& src) { void CubemapUtils::generateUVGrid(Cubemap& cml, size_t gridFrequency) { Cubemap::Texel const colors[6] = { - { 1, 0, 0 }, // l - { 0, 1, 1 }, // r - { 0, 1, 0 }, // b - { 1, 0, 1 }, // t - { 0, 0, 1 }, // bk - { 1, 1, 0 }, // fr + { 1, 0, 0 }, // -X / l - red + { 1, 1, 1 }, // +X / r - white + { 0, 1, 0 }, // -Y / b - green + { 0, 0, 1 }, // +Y / t - blue + { 1, 0, 1 }, // -Z / bk - magenta + { 1, 1, 0 }, // +z / fr - yellow }; const float uvGridHDRIntensity = 5.0f; size_t gridSize = cml.getDimensions() / gridFrequency;