CesiumGS / CesiumGS/cesium

Strange 2D full map lighting

Open
#1,825 23 comments 0 reactions 0 assignees View on GitHub
category - 2d / columbus view onramping priority - high type - bug
Dominant language
JavaScript
Stars
15.8k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

Probably due to the multiple sun and moon light sources.

![image](https://cloud.githubusercontent.com/assets/782098/3250636/2e5e60d4-f1a8-11e3-8933-44bb4a758079.png)

Sandcastle code:

``` javascript
var viewer = new Cesium.Viewer('cesiumContainer', {
sceneMode: Cesium.SceneMode.SCENE2D
});
var scene = viewer.scene;

var instances = [];

for (var lon = -175.0; lon < 175.0; lon += 5.0) {
for (var lat = -85.0; lat < 85.0; lat += 5.0) {
instances.push(new Cesium.GeometryInstance({
geometry : new Cesium.RectangleGeometry({
rectangle : Cesium.Rectangle.fromDegrees(lon, lat, lon + 5.0, lat + 5.0),
vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
}),
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.WHITE)
}
}));
}
}

scene.primitives.add(new Cesium.Primitive({
geometryInstances : instances,
appearance : new Cesium.PerInstanceColorAppearance()
}));
```

Contributor guide

Open the contributing guide

Research direction

Start by running the supplied Sandcastle example with Cesium.Viewer in SCENE2D and inspect how the scene's lighting affects the generated RectangleGeometry primitives. Trace the 2D rendering and lighting path from scene.primitives; done should mean the full map renders with consistent, expected lighting rather than the shown artifact.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.