CesiumGS / CesiumGS/cesium

GroundPrimitive.debugShowShadowVolume doesn't show up when color is opaque

Open
#4,027 5 comments 0 reactions 0 assignees View on GitHub
category - graphics type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

For example, the shadow shows up with this:

``` javascript
var viewer = new Cesium.Viewer('cesiumContainer');
var rectangleInstance = new Cesium.GeometryInstance({
geometry : new Cesium.RectangleGeometry({
rectangle : Cesium.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0)
}),
id : 'rectangle',
attributes : {
color : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5)
}
});
viewer.scene.primitives.add(new Cesium.GroundPrimitive({
geometryInstances : rectangleInstance,
debugShowShadowVolume : true
}));
```

But not this:

``` javascript
var viewer = new Cesium.Viewer('cesiumContainer');
var rectangleInstance = new Cesium.GeometryInstance({
geometry : new Cesium.RectangleGeometry({
rectangle : Cesium.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0)
}),
id : 'rectangle',
attributes : {
color : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 1.0)
}
});
viewer.scene.primitives.add(new Cesium.GroundPrimitive({
geometryInstances : rectangleInstance,
debugShowShadowVolume : true
}));
```

Contributor guide

Open the contributing guide

Research direction

Start with the GroundPrimitive shadow-volume rendering path and reproduce the issue using the two JavaScript examples in the report. Compare the translucent and opaque color cases; done when debugShowShadowVolume displays the shadow volume for the opaque color as well.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.