From 5de26c213b815ab27940eb50f36a3e5c0bce577b Mon Sep 17 00:00:00 2001 From: Dan Bagnell Date: Mon, 29 Jun 2015 15:46:16 -0400 Subject: [PATCH 1/2] Fix lighting issue for translucent geometry in 2D. --- Source/Shaders/Builtin/Functions/translucentPhong.glsl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Shaders/Builtin/Functions/translucentPhong.glsl b/Source/Shaders/Builtin/Functions/translucentPhong.glsl index 97bd4609c360..43b7596b7b35 100644 --- a/Source/Shaders/Builtin/Functions/translucentPhong.glsl +++ b/Source/Shaders/Builtin/Functions/translucentPhong.glsl @@ -5,7 +5,12 @@ vec4 czm_translucentPhong(vec3 toEye, czm_material material) { // Diffuse from directional light sources at eye (for top-down and horizon views) float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal); - diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal); + + if (czm_sceneMode == czm_sceneMode3D) { + // (and horizon views in 3D) + diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal); + } + diffuse = clamp(diffuse, 0.0, 1.0); // Specular from sun and pseudo-moon From ec7824c3f291c9fc779fd220dd8bda2aca5db6d9 Mon Sep 17 00:00:00 2001 From: Patrick Cozzi Date: Tue, 30 Jun 2015 07:43:04 -0400 Subject: [PATCH 2/2] Update CHANGES.md --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 72935b5dac55..a0dde7454ef5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -30,6 +30,7 @@ Change Log * Add `QuantizedMeshTerrainData` constructor argument `orientedBoundingBox`. * Add `TerrainMesh.orientedBoundingBox` which holds the `OrientedBoundingBox` for the mesh for a single terrain tile. * Use `OrientedBoundingBox` when rendering terrain and imagery to improve performance of rendering and loading (by up to 50% of terrain/imagery tiles, depending on camera view). +* Fixed 2D and Columbus view lighting issue [#2635](https://github.com/AnalyticalGraphicsInc/cesium/issues/2635). ### 1.10 - 2015-06-01